Submit solution
Points:
10 (partial)
Time limit:
1.5s
Java
3.0s
PyPy 2
3.0s
PyPy 3
3.0s
Python 2
5.0s
Python 3
5.0s
Memory limit:
256M
Python
512M
Author:
Problem type
friends situated on the 2D plane, where each of his friends are located on a lattice point (point with integer-valued coordinates). Each of 's friends is able to orz if he is on or inside a circle of radius
. Can you count how many lattice points can be on such that is he orz'd by at least one of his friends?
Input Specification
The first line will contain .
The next lines will contain 3 integers
, the coordinates and radius of 's
friend.
Output Specification
Output the number of lattice points on one line.
Subtasks
Subtask 1 [20%]
Subtask 2 [30%]
Subtask 3 [50%]
No further constraints.
Sample Input
2
1 1 1
2 1 1
Sample Output
8
Comments