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 1369. Cockroach Race

haha 1.6 s AC ,congratulation to myself>....
Posted by Shen Yang 17 Dec 2016 13:32
oh yeah,  nearly 1000 submits, i dont remember
Re: haha 1.6 s AC ,congratulation to myself>....
Posted by Shen Yang 17 Dec 2016 13:35
so I get a conclusion:

I use veronoi diagram algorithm ,it will have precision error.

if you sort coordinates by x,  you will get WA on test 17,if you sort it by y,you will get WA on test 21..

so I combine them together, do sort them by x,then sort them by y, and compare the minimum distance, it'll get AC..
Re: haha 1.6 s AC ,congratulation to myself>....
Posted by Shen Yang 17 Dec 2016 13:35
so I get a conclusion:

I use veronoi diagram algorithm ,it will have precision error.

if you sort coordinates by x,  you will get WA on test 17,if you sort it by y,you will get WA on test 21..

so I combine them together, do sort them by x,then sort them by y, and compare the minimum distance, it'll get AC..
Re: haha 1.6 s AC ,congratulation to myself>....
Posted by Orient 6 Mar 2017 22:15
gz. It is called "lexicographical sorting".