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

RedField

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1382    Accepted Submission(s): 530


Problem Description
As the graph you see below, we named the red part "RedField".The read part is the intersection of an ellipse and a triangle.Now, 8600's not good at math, so he wants you to help him calculate the area of the "RedField".
 

Input
The first line of input contains n, the number of test cases. n lines follow.Each test case contains four numbers a, b, x, y(0 < b <= a <= x),and a is the lenth of OA, b is the lenth of OB,and x, y representing the coordinate of the point P.
 

Output
For each test case, output the area of the "RedField",accurate up to 2 decimal places.
 

Sample Input
1 1.00 1.00 2.00 2.00
 

Sample Output
0.39
 

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-04-30 13:24:39, Gzip enabled