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 1062. Triathlon

This question looks easy. but i got WA, Help!
Posted by abc 11 Jan 2003 06:47
My algo is as follows:
1.for any contestant i:
2.     if(there is a contestant j whose three speeds all equal to i )
3.     then   i and j are both sure losers;
4.     else if(the three speeds of j are no less than i)
5.     then   i is a sure loser;
6.     else if(the three speeds of j are no more than i)
7.     then   j is a sure loser;
8.for any contestant i:
9.     if(i is a sure loser) writeln(No);
10.    else writeln(Yes);
Of course no :) (-)
Posted by Miguel Angel 20 Jan 2003 02:32
> My algo is as follows:
> 1.for any contestant i:
> 2.     if(there is a contestant j whose three speeds all equal to
i )
> 3.     then   i and j are both sure losers;
> 4.     else if(the three speeds of j are no less than i)
> 5.     then   i is a sure loser;
> 6.     else if(the three speeds of j are no more than i)
> 7.     then   j is a sure loser;
> 8.for any contestant i:
> 9.     if(i is a sure loser) writeln(No);
> 10.    else writeln(Yes);
>
What about this test?
Posted by currently unnamed... 1 Nov 2005 09:48
4
10000 10000 1
10000 1 10000
1 10000 10000
2 2 2

the fourth contestant is not a "sure loser" but always lose...