Editorial for COCI '22 Contest 2 #5 Kruhologija
Submitting an official solution before solving the problem yourself is a bannable offence.
We can use the Euler characteristic of the surface, mainly
The trickiest part is counting the vertices. For each face, you can calculate the degrees of the four vertices forming the side. Let's say you are trying to calculate the degree of the left vertex of the edge you are pointing at. You can mark the current face and start a "left cycle" until you return to the marked face. The number of faces you visit is exactly the degree of the vertex, you can easily see this by "flattening" out the part around that vertex, it essentially looks like a flower with either
Comments