3111 - Centroid of Polygon

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
Post Reply
User avatar
ymondelo20
Posts: 1968
Joined: 9 years ago
Location: Universidad de las Ciencias Informáticas
Gender: None specified
Contact:

3111 - Centroid of Polygon

Post by ymondelo20 » 5 years ago



"Every problem has a simple, fast and wrong solution" OJ's Main Law. ;)

HaZard
Posts: 114
Joined: 6 years ago
Location: Camagüey - Cuba
Gender: Male
Contact:
Cuba

Re: 3111 - Centroid of Polygon

Post by HaZard » 5 years ago

¿la fórmula para calcular el centro de masas no es:
xm = (x1 + x2 + x3 + ... + xn) / n
ym = (y1 + y1 + x3 + ... + yn) / n
?
teruel

humbertodiaz
Posts: 97
Joined: 6 years ago
Gender: None specified

Re: 3111 - Centroid of Polygon

Post by humbertodiaz » 5 years ago

No. Eso funcionaria si el poligono fuese regular. Pero en este caso, es un poligono convexo arbitrario. La formula es media extraña...

Post Reply

Return to “Problem set”