# Cities Around Amsterdam

Consider this large set of 1D points on the number line. Let $$S$$ be the set of unordered pairs $$(p,q)$$ such that $$|p - q| \leq 1000$$. How many elements does $$S$$ contain?

×