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

Locked
david
Learning poster
Posts: 83
Joined: Mon Apr 21, 2003 10:14 pm

10002 center of masses

Post by david » Wed Jan 03, 2007 2:04 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.

User avatar
Carlos
System administrator
Posts: 1286
Joined: Sat Oct 13, 2001 2:00 am
Location: Valladolid, Spain
Contact:

Post by Carlos » Wed Jan 03, 2007 2:24 pm

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
Guru
Posts: 724
Joined: Wed Dec 19, 2001 2:00 am
Location: Germany

Post by Adrian Kuegel » Wed Jan 03, 2007 7:41 pm

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

Locked

Return to “Bugs and suggestions”