Problem A
Apple Orchard
Farmer John has many apple trees on his farm. Each apple tree has a circular area that provides shade during the hot summer. Farmer John is creating a pen for his cows and has several locations in mind. For each fenced off area he wants to know the percentage of that proposed area that is shaded.
Each proposed fenced off region is rectangular in shape, axis aligned, and specified by its lower left corner and the width and height of the region. Calculate the percentage of shaded area for each proposed fenced off rectangle.
Input
The first line of input contains two integers
Each of the next
Each of the next
Output
Output
Sample Input 1 | Sample Output 1 |
---|---|
2 2 0 0 3 2 1 4 0 0 3 3 -3 -3 6 6 |
100 89.53678472917 |
Sample Input 2 | Sample Output 2 |
---|---|
4 3 -1 -1 3 1 -1 3 -1 1 3 1 1 3 -4 -4 8 8 -1 -4 2 8 -3 -1 12 3 |
87.2221423775645 98.5869913729161 57.8623304576387 |