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

建议使用的浏览器:

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

4808:Drunk

Special Judge 特殊评判
题目描述
Jenny is seriously drunk. He feels as if he is in an N-dimension Euclidean space, wandering aimlessly. In each step, he walks toward some direction and the “length” of each step will not exceed R. Technically speaking, Jenny is initially located at the origin of the N-dimension Euclidean space. Each step can be represented by a random N-dimension vector(x1, x2, ... , xn) chosen uniformly from possible positions satisfying xi >= 0 and x12 + x22 + ... <= R2.
Assume the expectation of his coordinate after his first step is (y1, y2, ... , yn). He wants to know the minimum yi .
输入解释
There are several (about 100,000) test cases, please process till EOF.
Each test case, only one line contains two integers N and R, representing the dimension of the space and the length limit of each step.(1 <= n <= 2 * 105, R <= 105).
输出解释
For each test case, print a real number representing the answer to the question above.
Your answer is considered correct if the difference between your answer and the correct one is less than 10-6.
输入样例
2 1
输出样例
0.4244131816
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-4808

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

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)