Home > Back-end >  Problem solving: a programming on the x axis have N isosceles right triangle, the hypotenuse and x a
Problem solving: a programming on the x axis have N isosceles right triangle, the hypotenuse and x a

Time:10-31

On the x axis have N isosceles right triangle, the hypotenuse and x axle load. The hypotenuse of vertex coordinates of (an, bn)
The area covered by these triangles and (overlap is only once)
Input:
The first line: integer N (1 & lt;=NCut down two integer N lines each row an, bn (1 & lt;=an bn<=100);
Output:
A number, said cover area (keep two decimal places)
The sample input:
3
7 3
4 4
11 5
The sample output:
42.00
  • Related