Note: This is NOT an official proof of the derived solution, as it is incoherent.
Source: https://math.stackexchange.com/a/458593/496530
From the above observation, 4 points of the polygon must be on the 4 sides of the minimal square. Each of 2 pairs, whose 2 points are on the opposite sides of the square, has the center of the polygon as its midpoint.
Below figures illustrate the minimal square when $$$n=5$$$. Half square on the left, full square on the right.
Recall: $$$n$$$ is odd. Let $$$d$$$ be the length of the longest diagonal.
Consider the point of interest to be $$$P$$$. Let's say $$$P$$$ is $$$k$$$ sides away from R, and $$$n-k$$$ sides away from M measured along the polygon circumference, where $$$k\in [0;n]$$$. Consider the left figure, $$$WU$$$ is the perpendicular bisector of $$$MP$$$, $$$WV$$$ is the perpendicular bisector of $$$RP$$$. Select $$$U$$$ where $$$\measuredangle{MPU}=45^{\circ}$$$. Select $$$V$$$ where $$$\measuredangle{RPV}=45^{\circ}$$$.
When $$$k=\lfloor\frac{n}{2}\rfloor+1$$$, $$$VU$$$ is the side of the minimal square containing the polygon.
Let $$$d=RM$$$ be the diagonal of the polygon.
But, $$$|VU|=d*\sin(\measuredangle{RMU})$$$, $$$|VU|$$$ should be smaller with smaller $$$\measuredangle{RMU}$$$ by using $$$k+1,k+2,..,n$$$. Why do these fail?
Because, when $$$k>\lfloor\frac{n}{2}\rfloor+1$$$, from the way the square was built, some points are outside of the square.
We can visualize these failed cases by considering 1 of them in the figure below where $$$n=9$$$, $$$k=6$$$ i.e. $$$k>\lfloor\frac{n}{2}\rfloor+1$$$:
We can show that the point immediately below the chosen point ($$$K$$$) is out of the square by proving $$$\measuredangle{EKJ}>45^{\circ}$$$.
Proof:
Recall that $$$K$$$ is $$$k$$$ sides away from $$$E$$$ along the polygon circumference. Recall that in failed cases, $$$k>\lfloor\frac{n}{2}\rfloor+1$$$.
$$$\measuredangle{SKE}=90^{\circ}-\frac{1}{2}.\frac{180^{\circ}.k}{n}$$$
$$$\measuredangle{EKJ}=(180^{\circ}-\frac{180^{\circ}}{n}).\frac{1}{2}-\angle{SKE}=\frac{90^{\circ}}{n}.(k-1)$$$
From $$$k>\lfloor\frac{n}{2}\rfloor+1$$$, since $$$n$$$ is odd and $$$k$$$ is integer, therefore $$$k-1>\frac{n}{2}$$$, so:
$$$\measuredangle{EKJ}>\frac{90^{\circ}}{n}.\frac{n}{2}=45^{\circ} \blacksquare$$$
Therefore $$$J$$$ (hence $$$F$$$) will be outside of the bounding square.
Now for the satisfied $$$k$$$:
$$$k=\lfloor\frac{n}{2}\rfloor+1\implies\measuredangle{EKJ}=\frac{90^{\circ}}{n}.\lfloor\frac{n}{2}\rfloor<\frac{90^{\circ}}{n}.\frac{n}{2}=45^{\circ}$$$
This guarantees $$$J$$$ (hence $$$F$$$ and other points in between) will be inside of the bounding square.
End of reasoning.
Solution for Educational Codeforces Round 87 C2:
By formula:
Let $$$r$$$ be the radius of the circumscribed circle of the polygon, $$$s$$$ be the length of the polygon side, $$$\beta$$$ be the angle formed by a radius and a polygon side, $$$\theta$$$ be the exterior angle of the polygon, $$$m$$$ be the number of sides of the polygon:
$$$\theta=360^{\circ}/{m}$$$
$$$r.\cos{\beta}=\frac{s}{2}{\implies}r=\frac{s}{2\cos{\beta}}=\frac{s}{2\cos{(\frac{\pi}{2}-\frac{\theta}{2})}}=\frac{s}{2\sin{(\frac{\theta}{2})}}$$$
double r =