ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1538. Towers of Guard

What method complexity should be used?(+)
Posted by SPIRiT 27 Sep 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?(+)
Posted by SPIRiT 28 Sep 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?(+)
Posted by Vedernikoff Sergey 29 Sep 2007 16:46
Theoretically, O(C(5,N)), but in a practice - O(1) :)
For a polygon with 4 vertices you need just 5.
Posted by SPIRiT 1 Oct 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?(+)
Posted by ibm 6 Mar 2008 00:19
There exists an algorithm with O(N*h) complexity...
Re: What method complexity should be used?(+)
Posted by Denis Koshman 11 Sep 2008 18:33
I have O(1) complexity