|
|||
lattice-2There are sprinklers in the garden. The sprinklers are given by their coordinates (). Additionally, for each sprinkler, the watering distance is given (). This should be understood as: a sprinkler at with radius reaches every point in the garden such that . For example, a sprinkler at with r=3 reaches all points in the rectangle . What is the total watered area ()? Input specificationThe first line contains - the number of test cases. Then test case descriptions follow. For each test case: First line: , the number of sprinklers. Then lines follow, each containing three numbers . Output specificationOutput lines, each containing the requested area . Constraints
Sample input 1
Sample output 1
|
|||
| University of Debrecen; Faculty of Informatics; v. 09/30/2024 |