P7270 [BalticOI 2002] Triangles (Day1)

Description

You are given $n$ isosceles right triangles. Each triangle is generated from a point $(x_i, y_i)$ by extending two perpendicular legs of length $m_i$ upwards and to the right. Find the total area covered by these triangles.

Input Format

The first line contains an integer $n$, the number of triangles. The next $n$ lines each contain three integers $x_i, y_i, m_i$ describing one triangle.

Output Format

Output one real number, the answer. Keep only one digit after the decimal point.

Explanation/Hint

#### Sample Explanation For sample $1$, the $5$ triangles are as follows: ![](https://cdn.luogu.com.cn/upload/image_hosting/a49ow7cr.png) #### Constraints For $100\%$ of the testdata, $1 \le n \le 2000$, $-10^7 \le x_i, y_i \le 10^7$, $0 \le m \le 1000$. #### Note Translated from [BalticOI 2002 Day1 C Triangles](https://boi.cses.fi/files/boi2002_day1.pdf). Translated by ChatGPT 5