Biology
Time limit1sMemory limit1024 MB
Construct 16 points and a planar straight-line graph on them with more than 300000 simple polygons formed by its edges.
- Level
Hard9 of 10
- Topics
- Geometry, Graph, Combinatorics
- Solved
- No attempts yet
Statement
Android Vasya prepares a research work in Biology. In this work he studies the class of arachnoids. Vasya is not interested in spiders themselves. His work focuses on the webs made by different species of spiders.
Vasya has already found out how a web is made. A web is a set of points called web knots, connected by so-called fibres. The knots can be seen as coplanar points. Each fibre is a line segment that connects two knots. The fibres cross only at knots.

Vasya wants to determine which spiders make the webs of highest quality. For this he defines the stickiness of a web as the number of different traps in it. A trap is a polygon whose vertices are web knots and whose edges are fibres. It has no self-crossings and no self-tangencies.
Vasya analysed several webs with 16 knots. Their stickiness is between and . Now he wants to know what a web with 16 knots and stickiness greater than can look like.
Input
There is no input data in this task.
Output
In the first 16 lines, output the coordinates of the web knots as integer pairs , (). In the next 16 lines, output the adjacency matrix of the web, a table of the symbols 0 and 1. The matrix must be symmetric, and its main diagonal must be filled with zeros.
Any two knots must lie at different points. Knots cannot lie on the inner points of fibres. Any two fibres may cross only at their common knot.
The web must have stickiness greater than . It is guaranteed that such webs exist.
Hint
The answer in the example is not correct. It only illustrates the output format. Note that you must output a web with 16 knots, not 6. The picture above corresponds to the example. The stickiness of the example web is only 21.