3869 - Hero’s assistant

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. Ywan find that the only way to save this country is to kill every loli. Ywan 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, Ywan suck at this problem, if ywan 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

提示

请不要提交,期待SPJ

时间限制 1 秒
内存限制 128 MB
讨论 统计
上一题 下一题