# Cities Around Amsterdam

Computer Science Level 3

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?

×