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

Обсуждение задачи 1710. Борис, ты не прав!

Useful tests for you, guys
Послано Vedernikoff Sergey (HSE: АОП) 12 апр 2009 15:01
0 0
0 1000
1 0
YES

0 0
1 1000
1 0
YES

0 0
1 1000
2 0
YES
Re: Useful tests for you, guys
Послано Smilodon_am 18 апр 2009 17:57
Real thanks, Sergey.
I had WA3. When I test my program with your tests, I get wrong answer on the second test. My mistake was in comparing the angle ACB with 90 degrees. There was (in C++):
if (angle==pi/2.0)...
but the right text would be:
if (fabs(angle-pi/2.0)<=1e-11)...

When I fixed the problem I got AC.
Re: Useful tests for you, guys
Послано Vedernikoff Sergey (HSE: АОП) 21 апр 2009 16:52
Never forget to use EPS when compare real numbers. Without it, result of the work of your program is almost unpredictable
Re: Useful tests for you, guys
Послано Oleg Strekalovsky [Vologda SPU] 18 май 2009 00:12
Vedernikoff Sergey (HSE: АОП) писал(a) 12 апреля 2009 15:01
0 0
0 1000
1 0
YES

0 0
1 1000
1 0
YES

0 0
1 1000
2 0
YES
0<=|x|,|y|<=100
But tests are useful :)

Edited by author 18.05.2009 12:28
Re: Useful tests for you, guys
Послано Vedernikoff Sergey (HSE: АОП) 19 май 2009 21:05
If 1000 insted of 100 prevents your program from passing the tests, then your program is really horrible =)
P.S. I've written 1000 instead of 100 as a very corner cases specially to test possible error instability.
Re: Useful tests for you, guys
Послано Sevenk 29 авг 2009 09:54
I have known that.