F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

k-th point

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 302    Accepted Submission(s): 82
Special Judge


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
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-07-14 09:23:42, Gzip enabled