Eclipse
People have always found solar eclipses fascinating. These occur when the Moon obscures the Sun, casting its shadow on Earth. However, for aliens in a distant galaxy, eclipses are a bit more intricate. They have multiple moons of varying sizes (though all are perfectly round), making it challenging to determine how much of their Sun is obscured by these moons, even when their positions are known. As a gesture of interplanetary friendship, help them by writing a program that calculates the percentage of the Sun's area covered by the moons in a simplified, flat model.
Input
The first line contains three integers x_0, y_0, r_0 — these represent the coordinates of the center and the radius of the Sun in the flat model.
The second line contains a single natural number N — the number of moons, where 1 ≤ N ≤ 10.
The following N lines each contain three integers x_i, y_i, r_i — these are the coordinates of the centers and the radii of the moons in the flat model.
All center coordinates range from -20 to 20 (inclusive), and the radii range from 1 to 20 (inclusive).
Output
The output should be a single integer P — the percentage of the Sun's area covered by the moons, rounded to the nearest whole number according to standard rounding rules.