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

建议使用的浏览器:

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

4904:Hero’s assistant

Special Judge 特殊评判
题目描述
There is an old country and the king fell in love with a devil. The devil always asks the king to do some crazy things. Although the king used to be wise and beloved by his people. Now he is just like a boy in love and can’t refuse any request from the devil. Also, this devil is looking like a very cute Loli.

Y*wan find that the only way to save this country is to kill every loli. Y*wan is fine about that because he doesn't like loli. But the princess's knight's member just thinks he is insane. So they compete in an algorithm contest.

In this contest, Y*wan suck at this problem, if y*wan can't win, the mankind will become extinct, so it's your turn to help y*wan solve this problem.

There are n points in the plane, you pick a random point in [0,X] x [0,Y], after that you output the second nearest squared distance from this point to those n points. What is the expectation of your output?
输入解释
The first line contains an integer T, denoting the number of the test cases.
For each test case, the first line contains 3 integers n,X,Y.
The next n lines, each contains 2 integers x, y, denote that there is a point x,y.

T<=5,2<=n<=100.
0<=X,Y<=100 , -200<=x,y<=200
输出解释
For each test case, output the answer in one line.
This problem is special judged. The relative error less than 1e-6 will be accepted.
输入样例
1
2 10 10
0 0
10 10
输出样例
100.0000000000
来自杭电HDUOJ的附加信息
Author WJMZBMR
Recommend

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

源链接: HDU-4904

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

共提交 0

通过率 --%
时间上限 内存上限
3000/1500MS(Java/Others) 131072/131072K(Java/Others)