2437: The grabber
Result | TIME Limit | MEMORY Limit | Run Times | AC Times | JUDGE |
---|---|---|---|---|---|
3s | 8192K | 266 | 62 | Standard |
When you buy land at the vast grassland, the area depends on your equestrianism. The farmer will give you a horse after received a fixed amount of money. You and your horse set out at sunrise, back home at sunset. The total enclosed region by your path is what you gained. But if you can't back on time, you will get nothing.
If you know how long you can walk, you may know the best way is draw a circle which perimeter is just enough.
Another farmer gives a new method with more money. The buyer should give two point before. And then start from one point, arrive to another. The enclosed region by the straight line between the two points and your path is what you gained.
Do you know the best result when you know the distance that you can move.
Input
On each line, two positive double value d and s are given. d is the distance between the fixed two points, s is the distance that you can drive.
Output
Output the maximal area that you can gain, the result is displayed to a precision of 3 digit after the decimal point.
Sample Input
1 2 2 3.14
Sample Output
0.528 1.570