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

建议使用的浏览器:

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

7049:Link with Grenade

题目描述
"We are wasting time, let's go."

"Terrorists win."

"Form up, let's go."

"Terrorists win."

......

After being defeated several times, he was so angry that he decided to cheat. He used some tricks to make himself fly really high so that nobody could hurt him. He started to throw grenades, but he suddenly found that he had only 1 hp, which means he would die if the grenade hurt him. Now, Link wants to know the possibility that he will die.

Formally, there is a grenade with initial speed $v_0$ m/s and explode time $t$ s, which was thrown in a random direction. When the grenade explodes, it will hurt anyone whose distance to it is no more than $r$. Supposing that the grenade didn't touch anything before explosion, and the man didn't move after throwing the grenade, you should output the probability that the man will survive.

In order to check your answer precisely, you should output it modulo $10^9+7$.

Hint

Note1: This is a 3D game. In this game, the acceleration of gravity is $10$ $m/s^2$.

Note2: It can be proved that the answer can always be represented as $\frac{p}{q}$, where the greatest common factor between $p$ and $q$ is $1$. When outputting the answer modulo $M$, you should output such an integer x that $0 \leq x < M$ and $ x \cdot q \equiv p (mod\ M) $.
输入解释
The input consists of multiple test cases.

The first line contains an integer $T$ ($1 \leq T \leq 10^5$) -- the number of test cases.

Each test case contains three integers $t_0,v_0$ and $R$ ($1 \leq t_0,v_0,R \leq 100$).
输出解释
For each test case, print the answer modulo $10^9+7$ in a single line.
输入样例
5
1 10 10
1 16 10
1 15 10
1 4 10
1 5 10
输出样例
625000005
1
1
0
0

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

源链接: HDU-7049

最后修改于 2021-10-23T19:11:12+00:00 由爬虫自动更新

共提交 0

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