Baltic Olympiad in Informatics: 2002 Day 1, Problem 3
There are given isosceles right triangles on a plane. Each triangle can be described by three integers . Vertices of such a triangle are points which have coordinates , and .
Write a program which calculates the total area covered by triangles.
Constraints
Input Specification
The first line of input contains one positive integer , the number of triangles on a plane.
The next lines describe the triangles, one triangle per line. Each line contains three space-separated integers , and .
Output Specification
Output one number with exactly one digit after the decimal point - the total area covered by triangles.
Sample Input
5
-5 -3 6
-1 -2 3
0 0 2
-2 2 1
-4 -1 2
Sample Output
24.5
Comments
Forest Area is a similar problem with higher constraints.