The forum to report every bug you find or tell us what you'd like to find in UVa OJ
Moderator: Board moderators
- Learning poster
- Posts: 83
- Joined: Mon Apr 21, 2003 10:14 pm
I think judge's input is flawed. I'm pretty sure my solution is correct, but I always get WA, and browsing through the forums shows that only people who compute the convex hull first get AC, but this shouldn't be necessary as the problem description says the polygon is convex (so one should only need to sort the points by angle). Thus I think the judge data cointains concave polygons.
- System administrator
- Posts: 1286
- Joined: Sat Oct 13, 2001 2:00 am
- Location: Valladolid, Spain
mail us your code and we'll check it.
DON'T PM ME --> For any doubt, suggestion or error reporting, please use the "Contact us" form in the web.
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
Note that the points of the convex polygon can be given in any order, so if you want to find the center of masses you have to determine the correct order of the points first (this can be done by calculating the convex hull, although actually you need only the sorting step of a graham scan).