Problem

Source: 2022 Taiwan TST Round 2 Independent Study 2-C

Tags: combinatorics, lattice points



There are $2022$ distinct integer points on the plane. Let $I$ be the number of pairs among these points with exactly $1$ unit apart. Find the maximum possible value of $I$. (Note. An integer point is a point with integer coordinates.) Proposed by CSJL.