CF820B Mister B and Angle in Polygon
题目描述
在一个边为 $n$ 的正凸多边形上,有一个角 $a$。
现在要找到三个不同的顶点 $v1$ , $v2$ , $v3$ 使得 $∠ v1 v2 v3$ (其中 $v2$ 是角度的顶点,并且 $v1$ 和 $v3$ 位于其两侧)尽可能接近 $a$(换句话说,该值应该尽可能小)。
如果有多个最优解,可以输出**任意一个**。
输入格式
一行包含两个空格分隔的整数 $n$ 和 $a$ ( $3
输出格式
输出三个空格分隔的整数:$∠ v1 v2 v3$ 的顶点 $v1$ , $v2$ , $v3$ 。如果有多个最优解,输出其中**任意一个**。 顶点按**顺时针**顺序从 $1$ 到 $n$ 编号。
说明/提示
In first sample test vertices of regular triangle can create only angle of $ 60 $ degrees, that's why every possible angle is correct.
Vertices of square can create $ 45 $ or $ 90 $ degrees angles only. That's why in second sample test the angle of $ 45 $ degrees was chosen, since $ |45-67|<|90-67| $ . Other correct answers are: "3 1 2", "3 2 4", "4 2 3", "4 3 1", "1 3 4", "1 4 2", "2 4 1", "4 1 3", "3 1 4", "3 4 2", "2 4 3", "2 3 1", "1 3 2", "1 2 4", "4 2 1".
In third sample test, on the contrary, the angle of $ 90 $ degrees was chosen, since $ |90-68|<|45-68| $ . Other correct answers are: "2 1 4", "3 2 1", "1 2 3", "4 3 2", "2 3 4", "1 4 3", "3 4 1".