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 1588. Jamaica

Why WA at # test 8?
Posted by SerailHydra 27 Oct 2007 15:08
Re: Why WA at # test 8?
Posted by CHIDEMYAN SERGEY 27 Oct 2007 17:47
I've WA#8 too.Interesting, what test is it?Thank!!!

Edited by author 27.10.2007 17:54
Re: Why WA at # test 8?
Posted by Irka(Ulyanovsk) irina-kruglova@yandex.ru 27 Sep 2008 23:08
And I had WA too; because of stupid mistakes.
This tests helped me to figure them out:
5
0 0
0 2
1 1
2 0
2 2

9
0 0
0 10
0 20
10 0
10 10
10 20
20 0
20 10
20 20
Re: Why WA at # test 8?
Posted by Pavel 2 Jan 2022 15:20
The thing is that if you order edges by an angle (atan) and length and do binsearch it's still possible that there will be edges with an appropriate angle, bigger length but not the one you are looking for, so binsearch in this case will give you a wrong result, so try to find a way to order them
Re: Why WA at # test 8?
Posted by Pavel 2 Jan 2022 15:26
simple test is
6
0 0
10 0
10 10
10 20
0 10
0 20

and the answer is 171