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 1 but right answer!!!
Posted by Wasdek 13 Nov 2013 21:42
On #1 test my program output:
4
6 1 5 4
but get wrong answer. Why?
Re: WA 1 but right answer!!!
Posted by morbidel 15 Nov 2013 17:17
Your progression is decreasing (9 7 5 3), which contravenes the problem statement:
"You should take a maximal number of different elements from this sequence which are successive terms of some increasing arithmetical progression."
Re: WA 1 but right answer!!!
Posted by Wasdek 16 Nov 2013 15:36
Thank you, i'll correct my mistake