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

To admins: please could you add such test case
Posted by Slusarenko Alexey 4 May 2009 00:41
My solution (as well as solutions of some other authors) got AC, but gives incorrect answer for such test case:

3
9999 9999 1
10000 9998 10000
9998 10000 10000

The correct answer is:

Yes
Yes
Yes

Please add it to system tests.

Edited by author 04.05.2009 00:44
Re: To admins: please could you add such test case
Posted by Oracle[Lviv NU] 29 Aug 2009 03:50
Really, i've got AC with incorrect answer for this test. I used too small infinity (1e10).
Re: To admins: please could you add such test case
Posted by Nguyễn Kim Vỹ 7 Jul 2010 15:44
Slusarenko Alexey wrote 4 May 2009 00:41
My solution (as well as solutions of some other authors) got AC, but gives incorrect answer for such test case:

3
9999 9999 1
10000 9998 10000
9998 10000 10000

The correct answer is:

Yes
Yes
Yes

Please add it to system tests.

Edited by author 04.05.2009 00:44

this test is incorrect !

9999a + 9999b + 1c > 10000a + 9998b + 10000c
9999a + 9999b + 1c > 9998a + 10000b + 10000c
=> 19998a+19998b+2c > 19998a+19998b+ 20000c
=> 2c > 20000c !!!!
that why the answer is:
No
Yes
Yes
Re: To admins: please could you add such test case
Posted by Valentin (PSU) 26 Aug 2010 13:56
a/9999 + b/9999 + c/1 < a/10000 + b/9998 + c/10000
a/9999 + b/9999 + c/1 < a/9998 + b/10000 + c/10000

a = 9999^4
b = 9999^4
c = 1e-100
Re: To admins: please could you add such test case
Posted by Slusarenko Alexey 12 Sep 2010 21:47
I agree with Valentin.
We may also choose such a, b and c:
a = 9999
b = 9999
c = 1e-9

We get:
a/9999 + b/9999 + c/1 = 2 + 1e-9
a/10000 + b/9998 + c/10000 = a/10000 + b/9998 + c/10000 =
= 2 * 9999 * 9999 / (9999 * 9999 - 1) + 1e-15 >
> 2 + 2 / 9999 * 9999 > 2 + 2e-8 > 2 + 1e-9
So the first contestant can win.