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

Обсуждение задачи 1875. Angry Birds

What is in test №2?
Послано IgorKoval(from Pskov) 22 окт 2011 18:13
What is in test №2?
Re: What is in test №2?
Послано NNSTU#2 22 окт 2011 21:13
Try 1 1 2 2 3 3 4 4 5 5
Re: What is in test №2?
Послано IgorKoval(from Pskov) 22 окт 2011 22:38
""""It is guaranteed that there is no straight line containing the slingshot and more than one monkey.""""
This test is not correct. =)
Re: What is in test №2?
Послано NNSTU#2 22 окт 2011 23:08
You are right, sorry.
Try also 1 1 2 4 3 9 4 16 5 25
Re: What is in test №2?
Послано IgorKoval(from Pskov) 22 окт 2011 23:17
Try my test:

1 1
1 2
1 3
1 4
1 5
ans: 5

Test #2
1 5
2 8
3 10
4 8
5 5
ans : 2


1 1
2 4
3 9
4 8
5 5
ans : 3 !!!!!! =)
when we draw parabola y = a*x*x+b*x, be careful, this must be: a<0 and b!=0
P.S.:
hint: fabs( p[i].y - a*p[i].x*p[i].x - b*p[i].x ) <= 1e-10( don't use p[i].y = a*p[i].x*p[i].x + b*p[i].x )
Re: What is in test №2?
Послано IgorKoval(from Pskov) 22 окт 2011 23:18
NNSTU#2 писал(a) 22 октября 2011 23:08
You are right, sorry.
Try also 1 1 2 4 3 9 4 16 5 25

ans: 5 =)

Thank you!!!

Edited by author 22.10.2011 23:32
Re: What is in test №2?
Послано Vitaliy Karelin 24 окт 2011 20:53
My solution got AC only on fabs()<=1e-8

fabs()<=1e-9 had WA#26 (!)
fabs()<=1e-7 had WA#57 (!!!)

I'm Angry very much.
Re: What is in test №2?
Послано svr 25 окт 2011 11:23
To avoid be angry!
How verify that big number D==0?
You may use next idea:
int p[6]={61,67,59,53,41,47};
for(i=1;i<=6;i++)
if(D%p[i-1]>0) break;
if (i>6) return true;

More rightly: We can solve problem 6 times in fields Z(61),...,Z(47)
All numbers will be not greater 100, but if in all fields D==0 then in N also D==0.

P.S. I appled this idea.
I had problems with logics but no problems with precision and
5 -is oldest WA test for me.

Edited by author 25.10.2011 13:05
Re: What is in test №2?
Послано Georgi Chakarov 6 ноя 2011 16:55
I pass all the tests in the topic and have set the precision but still get WA#14.
Re: What is in test №2?
Послано oops 12 апр 2012 09:43
Last test is not correct, because of point (1,1) and (5,5) belong same line.