1 人解决,6 人已尝试。
1 份提交通过,共有 16 份提交。
9.9 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
On mother’s day,the organizer give everyone a square piece of paper, measured L cm in both width and height. Pick a point P on AD with AP = X cm; Pick a point Q on BC with CQ = Y cm. The paper is then folded along PQ.
Partychen what you to write a program to help him to calculate the area of overlap (the grey region) as shown in the figure.
The first line of the input is an integer N (0<N<5000). Each of the following N lines contains three non-negative real numbers L, X, Y separated by space.
You may assume that L is always positive and that X, Y ≤ L.
Write a line for each input containing the area of overlap. Numbers should be rounded to 3 digits after the decimal point.
3 100.0 50.0 50.0 100.0 0.0 0.0 250.0 50.0 80.0
5000.000 5000.000 25230.314
1 人解决,6 人已尝试。
1 份提交通过,共有 16 份提交。
9.9 EMB 奖励。