ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1346. Intervals of Monotonicity

If you have WA#21
Posted by JTim 30 Sep 2007 01:56
input:
-3 3
2 2 1 2 2 1
output:
2
Re: If you have WA#21
Posted by Grigor Gevorgian 13 Jun 2008 14:43
your test is wrong 'cause A must be >=0
Re: If you have WA#21
Posted by alexey saybel 12 Feb 2010 15:09
This tests can help you:

1 3
2 2 1 2 2 1
1

1 3
1 1 2 2 2 1
1
Re: If you have WA#21
Posted by ... 9 Mar 2010 21:39
alexey saybel wrote 12 February 2010 15:09
This tests can help you:

1 3
2 2 1 2 2 1
1

1 3
1 1 2 2 2 1
1
I think, that your test's are not correct.Second line must contain f(1),f(2),f(3) and no more.
Re: If you have WA#21
Posted by ... 9 Mar 2010 23:39
Try tests:

1 9
1 2 1 2 3 2 1 2 1
4

1 10
1 2 1 2 1 0 1 2 1 2
5

1 7
1 2 1 2 1 0 1
5

My solution is greedy. One boolean, one counter and list of nonrecurring array of numbers, but i think, that we can work with numbers during reading.
Nice problem :)
Re: If you have WA#21
Posted by Artem Khizha [DNU] 10 Aug 2010 14:30
> 1 7
> 1 2 1 2 1 0 1
> 5
How can that be true? (1, 2), (1, 2), (1, 0), (1) - this means, that answer should be 4.