Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thank you! :)
I did it using polar coordinate system. Each vertex has increasing angle (from 0 to 2PI-0.02 at last point) and not zero distance from (0,0). So, it can't intersect itself.
"Your task is to determine the area of a polygon that does not intersect itself and has no holes. You are given the coordinates of its vertices in the double[n][2] array. Coodinates will describe a polygon in counterclockwise order. The input is always valid."
Wiki: In geometry, a simple polygon is a polygon that does not intersect itself and has no holes.
1 So, is it not enough? If algorithm can calculate single random test what is the point for more tests?
2 & 3. It is poor task description, I think. My fault, thank you.
4 Done.
Removed the test, thank you.