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 1246. Tethered Dog

Виктор (marilyn_manson@bk.ru) My solution is very simple!!! [4] // Problem 1246. Tethered Dog 30 Jun 2004 15:00
We take the lowermost point - O.
The previous point - A, and following - B.
Let q = cos (corner between AO and axis OX)
r = cos (corner between BO and axis OX)

If q < r then ccw
 else cw

I got AC!!!
KingPin Re: My solution is very simple!!! [3] // Problem 1246. Tethered Dog 30 May 2005 22:34
Simple but wrong!

Simple test:

3
4 4
1 1
3 5

Your answer is ccw, but correct cw.
Another proof that timus test are weak :(
Yu Yuanming Re: My solution is very simple!!! [1] // Problem 1246. Tethered Dog 7 Jun 2005 07:35
  The method which find  the lowermost point is right...
  But don't use cos & sin, think another way :)
dmitri_quick Re: My solution is very simple!!! // Problem 1246. Tethered Dog 11 Aug 2009 01:13
MY! solution is simple)
only 6 actions for every Vertex. Don't use sin or cos
Roman Rubanenko Re: My solution is very simple!!! // Problem 1246. Tethered Dog 13 Jul 2010 17:48
....
3
4 4
1 1
3 5=cw?Have you ever seen any clocks?