0 人解决,2 人已尝试。
0 份提交通过,共有 4 份提交。
9.9 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
There are given n isosceles right triangles on a plane. Each triangle can be described by three integers x,y,m (m>0). Vertices of such a triangle are points which have coordinates (x;y), (x+m;y) and (x; y+m).
Write a program which calculates the total area covered by triangles.
The first line of the input contains one positive integer n (n <= 2000), the number of triangles on a plane.
The next n lines of the input describe the triangles, one triangle per line. Each line contains three integers xi, yi and mi, separated by single spaces (1 <= i <= n, -10^7 <= xi <= 10^7, - 10^7 <= yi <= 10^7, 0 < mi <= 1000).
On the first line one number with exactly one digit after decimal point must be written – the total area covered by triangles.
5 -5 -3 6 -1 -2 3 0 0 2 -2 2 1 -4 -1 2
24.5 Hint:
0 人解决,2 人已尝试。
0 份提交通过,共有 4 份提交。
9.9 EMB 奖励。