首页 > ACM题库 > HDU-杭电 > hdu 4653 k-th point待解决[解题报告]C++
2015
09-17

hdu 4653 k-th point待解决[解题报告]C++

k-th point

问题描述 :

Consider n data points uniformly distributed in a p-dimensional unit ball centered at the origin. What is the expected distance of the k-th farthest point? (Here k start from 0 to n-1, and 0-th is the farthest point, (n-1)-th is the nearest point.)

输入:

The first line contains a number T(T≤100), which is the number of the case number. The next T lines, each line contains a number p, n and k(1≤p, n≤104,0≤k≤n-1) you need to consider.

输出:

The first line contains a number T(T≤100), which is the number of the case number. The next T lines, each line contains a number p, n and k(1≤p, n≤104,0≤k≤n-1) you need to consider.

样例输入:

5
2 1 0
2 2 0
3 2 0
3 2 1
4 10 5

样例输出:

0.666666667
0.800000000
0.857142857
0.642857143
0.812559023