|
|
вернуться в форумTry this test: 2 1 1 3 answer: 2 3 1 4 I have wa#9,but my program does well in your data The case given here helped me. Notice that when you are selecting whether white part is to be selected or black part, and pushing the result in a vector or queue, due to DP, last part gets inserted first. So you have to consider that first result in the vector/queue is for the last pair of partition. May be this will help... 2 4 1 2 2 1 1 2 2 1 answer: 1 3 2 4 answer 1 2 3 4 is correct too. But I have wa3 |
|
|