402888: GYM100935 I Farm
Description
Saleem is a farmer. He has orange trees in his farm. The orange trees need a lot of water but this year there is not enough rain falls. Fortunately there is a well, but not all of this well is inside his farm. Saleem wants to make a deal with his neighbors. Everyone can take one gallon of water for every square meter of the well area inside his farm. you should help Saleem to know how many gallon of water he can take. If you know that:
- The farm is rectangle.
- The well is circle.
- The upper-left corner of his farm is inside the well.
- The width and the height of the farm are bigger than Diameter (2R) of the well.
Your program will be tested on one or more test cases. The first line of the input will be a single integer T, the number of test cases (1 ≤ T ≤ 10000). Followed by the test cases, each test case is on two lines. the first line consists of three integers -1000 ≤ Xc,Yc,R ≤ 1000 where (Xc,Yc) is the center of well and R is the radius. the second line consists of four integers -1000 ≤ Xb,Yb,Xu,Yu ≤ 1000 where (Xb,Yb) is the bottom-left corner and (Xu,Yu) is the upper-right corner.
OutputFor each test case print a line is the following format: "Case c: x" where c is the test case number starting from 1 and x is the amount of water rounded to 5 decimal places.
ExamplesInput1Output
0 0 2
0 -5 5 0
Case 1: 3.14159