编程介的小学生 2020-02-15 19:45 采纳率: 20.5%
浏览 84

k-th point 点的排序

Problem Description
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.)

Input
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.

Output
For each p, n and k, output the expected distance in a single line.The answer will be considered correct if the absolute or relative error doesn't exceed 10-4.

Sample Input
5
2 1 0
2 2 0
3 2 0
3 2 1
4 10 5

Sample Output
0.666666667
0.800000000
0.857142857
0.642857143
0.812559023

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 MATLAB yalmip 可转移负荷的简单建模出错,如何解决?
    • ¥15 数学的三元一次方程求解
    • ¥20 iqoo11 如何下载安装工程模式
    • ¥15 本题的答案是不是有问题
    • ¥15 关于#r语言#的问题:(svydesign)为什么在一个大的数据集中抽取了一个小数据集
    • ¥15 C++使用Gunplot
    • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
    • ¥15 matlab数字图像处理频率域滤波
    • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
    • ¥15 ELGamal和paillier计算效率谁快?