|
||||||||||
Link with GrenadeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 420 Accepted Submission(s): 241 Problem Description "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) $. Input 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$). Output For each test case, print the answer modulo $10^9+7$ in a single line. Sample Input
Sample Output
Source | ||||||||||
|