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 1452. Pascal vs. C++

WA 3?
Posted by Tkach 26 Jul 2006 18:41
My algo is DP + Binary Search O(N^2*log(N));

I check my program on 1000 random tests and he gives right answer...

What trick in test 3?

Please help who know somthing about #3...
Read the problem statement carefully (+)
Posted by Dmitry 'Diman_YES' Kovalioff 27 Jul 2006 12:47
"of _different_ elements" ... "which are successive terms of some _increasing_ arithmetical progression"
Re: Read the problem statement carefully (+)
Posted by Tkach 30 Jul 2006 13:34
But I remove all  identical elements before process...
One question:
For test:
5
1 1 1 1 1
Answer :
0 ?
Why 0? The answer is... (+)
Posted by Dmitry 'Diman_YES' Kovalioff 30 Jul 2006 14:33
1
1

or

1
2

or

1
3

or

1
4

or

1
5
Re: Why 0? The answer is... (+)
Posted by Tkach 31 Jul 2006 01:45
Thanks!!!
No Bug in code...
AC now..
Re: Why 0? The answer is... (+)
Posted by Alex Yaroshevich 24 Sep 2006 01:27
OMG, exclusive error ;)
thanks for thread ;)