Paddle Star

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Putata is fascinated with playing Zoe these days. Putata is practicing Zoe's ability, paddle star at this moment.

This ability allows Zoe to fire a star that she can redirect in flight. The damage dealt by the star is positively correlated to its flying distance. Formally, assume Zoe is currently at point XX and she fires in any direction. At any moment, Zoe can change the direction of the star. If the star is at point YY, and the new direction leads to some point ZZ, then the track of the star will be XYZX\to Y\to Z. If the star meets any enemy on its trace, it will immediately disappear and cause damage to the enemy.

Since Putata is not skilled enough to control this ability, the stars he fires always fit the following restrictions. The first segment XYXY always has length _1\ell\_1, and the second segment YZYZ always has length _2\ell\_2. Assume Zoe is facing direction XP\overrightarrow{XP} (which is a certain direction), and let XP,XY\langle\overrightarrow{XP},\overrightarrow{XY}\rangle be θ\theta degrees, XY,YZ\langle\overrightarrow{XY},\overrightarrow{YZ}\rangle be ϕ\phi degrees, then θ\[α,α]\theta \in \[-\alpha,\alpha] and ϕ\[β,β]\phi \in \[-\beta,\beta]. You can refer to the following picture to help you understand.

Putata's rival, Budada, wants to know the total area that could possibly be attacked by Putata's Zoe. However, Budada is busy with math problems, so he wants you to help him solve this problem.

입력

The first line contains one integer TT (1T1051\leq T \leq 10^5), the number of test cases.

For each test case, the input is a single line containing four integers _1\ell\_1, _2\ell\_2, α\alpha and β\beta (1_2_11091\leq \ell\_2\leq \ell\_1\leq 10^9, 0α900\leq \alpha \leq 90, 0β<1800\leq \beta < 180), indicating the attributes of the ability.

출력

Print one line for each test case, containing one real number indicating the answer.

Your answer will be considered correct if its absolute or relative error does not exceed 10610^{-6}. Formally, let your answer be aa, and the jury's answer be bb. Your answer will be considered correct if abmax(1,b)106\frac{|a-b|}{\max(1,|b|)}\leq 10^{-6}.