I doubt whether the standard solution for problem E is correct.

The problem is: when two center's distance is smaller than 2R, the two circles may still be separated on the grid matrix.

Consider the following case:

Circle 1: center (0,0) radius 14

Circle 2: center (20,19) radius 14

The eculid distance between center is , which is less than 28.

However, the 2 circles do not intersect on a grid matrix, since no integer coodinate falls on their intersection area. So the 2 circles are still valid solution.

But it seems that the standard solution did not consider this special case. I (and many others) got wa on test 20. After I changed the intersect checking to "center distance<=2R" it got accepted.

solution: http://codeforces.com/contest/363/submission/5067126 notice the quoted code between line 77 and 82. after removing these codes the solution got WA.

A possibly wrong test case for the std solution: http://paste.ubuntu.com/6399141/