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

Обсуждение задачи 1477. Самолёты

Is something wrong with my algorithm?
Послано upb_guys 26 сен 2006 23:42
My algorithm is as follows: I consider planes that cut the sphere in half - they are determined by two points in the input and the center of the sphere. I split the input points in three sets according to this plane - points "above" the plane (say N1 points), points "under" the plane (say N2 points) and points in the plane (all of them being on one circle). Obviously at this moment these points on this circle are not visible since they aren't on the open emisphere, so I try to move this emisphere just a little to make the maximum number of points visible. To handle this, I find the maximum number of points P on some semi-circle. So I conclude that the maximum number of visible points using this plane is the maximum between N1+P and N2+P.

Can you give me a case for which this algorithm is not correct? I get WA on test-case 7. Thanks.
Re: Is something wrong with my algorithm?
Послано Igor E. Tuphanov 28 сен 2006 18:07
Your algorithm is correct.
Re: Is something wrong with my algorithm?
Послано Vedernikoff Sergey 10 ноя 2006 13:10
Try these tests:

Input #1:
1
0 0 1

Output #1:
1

Input #2:
3
0 0 1
0 0 100
0 0 600

Output #2:
3
Re: Is something wrong with my algorithm?
Послано {AESC USU} Dembel 9 окт 2007 21:25
Test #2 is incorrect, isn't it?
"There is not more than one plane at each point of the Earth's surface."