|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияI've solved this problem finally, of course, but I still suppose its definition to be unclear a bit :) So some tests for you: 1 3 1 1 1 1 // 1 5 1 2 3 4 5 // 1 5 5 4 3 3 3 1 // 1 7 1 2 2 3 3 4 5 1 // 1 5 1 2 3 2 1 2 // 1 6 1 2 3 2 3 4 2 - that's the point! // 1 6 3 2 1 4 4 5 2 // 1 6 1 2 1 2 1 2 3 // 1 6 1 2 3 1 2 1 3 Thank you. I've solved this problem finally too. The problem statement is quite ambiguous. Thank you for clarification. Thank you for tests! Who has problem with test 9 - use test 1 12 1 2 3 3 2 1 1 2 3 4 5 4 Answer - 4 Thanks! Problem statement really lacks definition for flat slopes... Thanks! Если честно, то условие ваще дурацкое. >> 1 6 1 2 3 2 3 4 2 - that's the point! >> Why so? =( I know, that problem of my solution in this but don't understand.. I think it should be 3. cause it can be divided in (1,2,3) and (2,3,4) > 1 6 > 1 2 3 2 3 4 Well, I see, it can be divided into (1, 2, 3) and (2, 3, 4). But I don't see anything in the statement, that restricts me to divide into (1, 2), (3, 2), (3, 4). Does this mean, that complexity should be minimal? Then why cant it be divided into (1,2) , (3,2) , (3) , (4) ? Because (1,2) , (3,2) , (3) , (4) = complexity 4 is not optimal Less complexity is: (1,2) , (3,2) , (3,4) = complexity 3 Optimal is: (1,2,3) , (2,3,4) = complexity 2 It is not necessary to connect point #3 and point #4 Hi! 1 3 2 10 5 ->2 * 1 5 20 20 200 20 200 ->2 * 1 5 1 2 2 1 1 ->2 * WA#21 MOPDOBOPOT (USU) 15 сен 2012 23:32 This test helped me to overcome WA21: input: 1 7 2 2 1 2 2 1 2 output: 3 Thanks for the test cases. Agreed. The problem is easy, but the sample I/O is very misleading. |
|
|