Problem

Source: IMO LongList 1967, Mongolia 1

Tags: combinatorics, counting, IMO Shortlist, IMO Longlist



Given $m+n$ numbers: $a_i,$ $i = 1,2, \ldots, m,$ $b_j$, $j = 1,2, \ldots, n,$ determine the number of pairs $(a_i,b_j)$ for which $|i-j| \geq k,$ where $k$ is a non-negative integer.