Chino's Latte Art
Time limit1sMemory limit1024 MB
Construct a simple polygon with exactly 100000 vertices that is heart-shaped, symmetric about line AB, with coordinates within 2,000,000 in absolute value.
- Level
Hard8 of 10
- Topics
- Geometry, Implementation, Math
- Solved
- No attempts yet
Problem
While looking for heart shapes in Chino's Latte Art (Hard), Cocoa wondered: can a latte art that is both a polygon and heart-shaped be made very small and delicate? Help Cocoa answer her question.
A polygon is defined as heart-shaped if there exist polygon vertices and such that all of the following conditions hold.
- The interior angle at is less than degrees, and the interior angle at is greater than degrees.
- The given polygon is symmetric about the line .
- When the given polygon is split by the segment , both resulting parts are convex polygons.
Input
A single value () is given.
Output
Print the coordinates of the vertices of a polygon representing the latte art, starting from any vertex and listing them in clockwise order. On the -th line, print the and coordinates of the -th point, in that order.
The polygon must satisfy the following conditions.
- It must be a simple polygon with exactly vertices.
- No vertex may have an interior angle of exactly degrees.
- Every vertex must have integer coordinates satisfying .
- It must satisfy the heart-shape conditions defined above.