题目描述
Lux has a plan to eliminate the invisible motionless enemy Teemo, whose location is detected by the Oracle Lens. She decides to cast an ultimate skill immediately, which would slay Teemo if hit because Lux has very high ability power.
Lux’s ultimate skill, Final Spark, is a powerful skill which can damage enemies by a straight beam of light with infinite length and ww meters width. It will deal damage to who shares at least a point with the light beam.
But Teemo - The Swift Scout - is a well-trained soldier. He will fleetly react to the Lux’s action, and try to dodge the ray by choosing a uniformly random direction and run along the direction. Between the first action of Lux and the moment the ray finally pokes out, Lux needs time to channel the ultimate, and during the channelling Teemo can run ss meters - note that Teemo always run in a straight line.
She should choose the direction of the Final Spark before any action is taken. At the instant before Lux casting the ultimate skill using the best strategy, she wonders how possible is the skill hit Teemo. She recalls that Teemo can be recognized as a circle with radius rr meters, and now Teemo is dd meters away from Lux.
It’s very hard for Lux to calculate it. Can you answer Lux the possibility of hitting Teemo when she uses the best strategy?
输入格式
The first line contains an integer T ( 1 ≤ T ≤ 1 0 5 ) T(1 \leq T \leq 10 ^ 5) T(1≤T≤105) - the number of test cases.
Each test case description contains the only line with four integers, w , t , s , d ( 0 ≤ w , r , s ≤ 1000 , 1 ≤ d ≤ 3000 ) w,t,s,d (0 \leq w, r, s \leq 1000, 1 \leq d \leq 3000) w,t,s,<