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 1987. Nested Segments

Clarity for Problem Statement
Posted by Jihan Yin 6 Nov 2014 09:15
My code got WA for #27. After checking forever for errors, I edited my comparison for my set so that if two distances are equal, the distance with the bigger key will come first as a last desperation. After submitting this, I got AC.
I think this should be stated in the problem statement, because it affects the solutions.
For those that don't understand what I'm talking about:

Input:
2
1 1
1 1
1
1
(Before) WA 27
Output:
1
(After) AC
Output:
2
Re: Clarity for Problem Statement
Posted by SButterfly [Samara SAU] 6 Jan 2015 22:49
Your sample is incorrect. Because in the statment:
"The segments are ordered by non-decreasing ai, and when ai = aj they are ordered by decreasing length. All segments are distinct."