Hi everybody
Today the author of the majority of problems is Dmitry Zhukov, many thanks to him for this.
Also I want to thank Mike Mirzayanov for choosing problems for the contest and organizing it and Julia Satushina for the translation of the statements.
Good luck!
UPD:
-First , construct a full graph .
-Then remove a random Edge from the current graph . Two vertices of this edge have a degree of n-2, and the remaining edges have a (n-1)-degree. So we have the answer.
sigh , I was trapped in Problem B for a long time
It seems so hard for me!!!
Lets number the midpoints 0, 1 and 2 and assume that 0 is the midpoint of the side that is equal to both of its neighbors. We know that we have a polygon vertex lying on the symetral of 0, 1. I do binary search for this point A. For each candidate I do symmetry according to 0 and thus get point B. I have made the obvious observation that initially the points on the symetral of 0, 1 give us points B that are further away from 2 than 0, and then they become closer to 2. we are in fact interested in the moment in which the distances to 0 and 2 get equal. This allows us to make binary search.
After we finish the binary we have two of the vertices of our polygon. What is left is to do 2 more symmetries and check whether the obtained polygon complies to all requirements.
As a final note - in the beginning we assumed 0 is the center of the mid equal segment but in fact every of the three vertices can be that one. So we need to try all three possibilities to make sure no solution exists.