ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1062. Триатлон

To admins: please could you add such test case
Послано Slusarenko Alexey 4 май 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
Послано Oracle[Lviv NU] 29 авг 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
Послано Nguyễn Kim Vỹ 7 июл 2010 15:44
Slusarenko Alexey писал(a) 4 мая 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
Послано Valentin (PSU) 26 авг 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
Послано Slusarenko Alexey 12 сен 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.