Some tests to clear problem definition (+)
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
Re: Some tests to clear problem definition (+)
Thank you. I've solved this problem finally too.
Thank you.Your tests are very useful
Thank you
The problem statement is quite ambiguous. Thank you for clarification.
Re: Some tests to clear problem definition (+)
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
Re: Some tests to clear problem definition (+)
Thanks! Problem statement really lacks definition for flat slopes...
Re: Some tests to clear problem definition (+)
Thanks! Really helpful!
Re: Some tests to clear problem definition (+)
Thanks!
Если честно, то условие ваще дурацкое.
Re: Some tests to clear problem definition (+)
>>
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.
Re: Some tests to clear problem definition (+)
cause it can be divided in (1,2,3) and (2,3,4)
Re: Some tests to clear problem definition (+)
It is not necessary to connect point #3 and point #4
Again about this test.
> 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?
Re: Some tests to clear problem definition (+)
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
This test helped me to overcome WA21:
input:
1 7
2 2 1 2 2 1 2
output:
3
Re: Again about this test.
Послано
A.06 8 апр 2013 22:33
Then why cant it be divided into (1,2) , (3,2) , (3) , (4) ?
Re: Again about this test.
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
Re: Some tests to clear problem definition (+)
Thanks for the test cases. Agreed. The problem is easy, but the sample I/O is very misleading.
Re: Some tests to clear problem definition (+)
Послано
Xkev 27 окт 2022 11:18
Of great help.Thanks.
Re: Some tests to clear problem definition (+)
Thanks: WA2 -> WA25