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

Link with Grenade

Time 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
5 1 10 10 1 16 10 1 15 10 1 4 10 1 5 10
 

Sample Output
625000005 1 1 0 0
 

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-11-22 16:38:14, Gzip enabled