Example 5 For integer pairs $(a, b)(0<a<b<1000)$, a set $S \subseteq\{1,2, \cdots, 2003\}$ is called a "jump set" of the pair $(a, b)$: if for any element pair $\left(s_{1}, s_{2}\right)$, $s_{1}, s_{2} \in S,\left|s_{1}-s_{2}\right| \notin\{a, b\}$.

Let $f(a, b)$ be the maximum number of elements in a jump set of the pair $(a, b)$. Find the maximum and minimum values of $f(a, b)$.
【Analysis】This method is quite typical, the minimum value is obtained using the greedy idea, while the maximum value is derived using the pigeonhole principle. Unfortunately, during the exam, most candidates only answered one part correctly.
For the minimum value, take $a=1, b=2$, then
$\{1,2,3\},\{4,5,6\}, \cdots$,
$\{1999,2000,2001\},\{2002,2003\}$

each set can contribute at most one element.
Thus, $f(1,2) \leqslant 668$.
Next, we prove that the minimum value is indeed 668, which requires proving that for any $(a, b), f(a, b) \geqslant 668$.
This proof process is similar to Example 4.
Since adding $x$ to the jump set $S$ means $x+a$ and $x+b$ cannot be added, after taking 1 for the first time, remove 1, $1+a$, and $1+b$. Each time, "greedily" take the smallest number $x$ that can be taken, and remove $x$, $x+a$, and $x+b$. This way, taking one element can result in at most three elements being unable to be taken, thus,
$$
f(a, b) \geqslant\left\lceil\frac{2003}{3}\right\rceil=668 \text {, }
$$

where $\lceil x\rceil$ denotes the smallest integer not less than the real number $x$.
In summary, $f_{\text {min }}=668$.
For the maximum value, since at most $a$ numbers can be taken from every $2a$ consecutive numbers to be added to the jump set, it can be roughly guessed that the maximum value is achieved by dividing the number set into three segments and taking the first and third segments. The specific process, due to the application of the pigeonhole principle, is omitted here to save space.