Comments
On MikeMirzayanovAbout the Round 382, 9 years ago
+30

Thank you for taking the time to write this so nicely.

c[i] must be greater than b[i], because ai or ak >= ai and ak. Using d[i] you lose this property. If you swap b[i] and c[i] for a problem with solution you would obtain a problem without solution but same array d.

Think some more.

On LoDTheTest for D732, 10 years ago
0

Your code is wrong. Answer can only be 9.

On LoDTheTest for D732, 10 years ago
0

My submission, which got AC, gives 9 as an answer.

On the 8th day there hasn't been a chance to pass exam 2 so the answer is at least 9.

On ssaviHelp For UVa — 624 ( CD ), 10 years ago
+3

This problem can be solved by backtracking.