当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

4660:Mathematical Olympiad

题目描述
This is a problem from IMO 2011.

Let S be a finite set of at least two points in the plane. Assume that no three points of S are collinear. A windmill is a process that starts with a line l going through a single point P∈S. The line rotates clockwise about the pivot P until the first time that the line meets some other point belonging to S. This point, Q, takes over as the new pivot, and the line now rotates clockwise about Q, until it next meets a point of S. This process continues indefinitely. Show that we can choose a point P in S and a line l going through P such that the resulting windmill uses each point of as a pivot infinitely many times.

Well... This is not your task. Your task is to determine the expected number of steps we need to run to come back to the original state if we choose the pivot point and the first point we meet at random with equal probability.
输入解释
First line, number of test cases, T.
Following are T test cases. For each test case, the first line contains one number, n. Each of the following n lines contains two numbers, X-coordinate and Y-coordinate of one point.

T<=10
3<=n<=1000
Absolute value of all coordinates <= 106
No three points are collinear.
输出解释
T lines, each line contains the answer.
The answer may be a fraction. In this case, you should output it in the simplest form.
输入样例
2
3
0 0
0 1
1 0
4
0 0
0 1
1 0
1 1
输出样例
3
20/3
来自杭电HDUOJ的附加信息
Recommend zhuyuanchen520

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-4660

最后修改于 2020-10-25T23:15:35+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
20000/10000MS(Java/Others) 131072/65536K(Java/Others)