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

Обсуждение задачи 1538. Сторожевые башни

What method complexity should be used?(+)
Послано SPIRiT 27 сен 2007 21:00
According to the time limit and N size we cannot use O(N^3). Therefore it should be O(N^2) or O(N^2*lnN). What's the trick? O(N^2) - it's just to select two points. How to find other three quickly? Perhaps they should be chosen randomly? Or maybe we should use Graham scan as many times as possible, to see what we get?
O(1) :) (-)
Re: O(1) :) (-). Was that a joke?(+)
Послано SPIRiT 28 сен 2007 15:04
Is there really such an algo? You don't have to tell me the idea, just say that there is such an algo...
Re: O(1) :) (-). Was that a joke?(+)
Послано Vedernikoff Sergey 29 сен 2007 16:46
Theoretically, O(C(5,N)), but in a practice - O(1) :)
For a polygon with 4 vertices you need just 5.
Послано SPIRiT 1 окт 2007 18:47
I thought about this problem. It can be proven, that you can build a polygon with 4 vertices from any 5 that don't lie on the same line (that is one of the statements). How many vertices does one need to build a 5 vertex convex polygon (I think about 10 or 15)...
Re: What method complexity should be used?(+)
Послано ibm 6 мар 2008 00:19
There exists an algorithm with O(N*h) complexity...
Re: What method complexity should be used?(+)
Послано Denis Koshman 11 сен 2008 18:33
I have O(1) complexity