Although it is water , but the road is much more difficult than the previous two a ...
Title effect: a rectangle you are in the same plane three rectangular coordinate system, after asking if you two completely covered before a
First of all, the most intuitive idea should be put first internal rectangular every integer point check to see if the other two located inside the rectangle
But a look at the data range, wow, $ 10 ^ 6 $, up to the point there are $ 10 ^ 12 $ a direct explosion, do not send a good go
We can only change the thinking. . .
Consider two rectangles beyond the rectangular section of no use, direct cut
So that we only consider the internal matrix of
Then please enjoy a few pictures:
As can be seen, the cover may be said to be a rectangular cut rectangular cover position above the same and corresponds to a size of the rectangle of the above
But if this is not covered by a black rectangle rectangular white