10002 center of masses

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

10002 center of masses

Post by david »

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

Post by Carlos »

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.

Adrian Kuegel
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel »

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).


Return to “Bugs and suggestions”