Given the integer centers of axis-aligned 2×2 squares, count how many pairs of squares overlap — fast enough for tens of thousands of squares.
Given the integer centers of axis-aligned 2×2 squares, count how many pairs of squares overlap — fast enough for tens of thousands of squares.
The discussion opens with the full question.