Problem: A magician has one hundred cards numbered $1$ to $100$.
He puts them into three boxes, a red one, a white one and a blue one,
so that each box contains at least one card.
A member of the audience draws two cards from two different boxes
and announces the sum of numbers on those cards.
Given this information,
the magician locates the box from which no card has been drawn.

How many ways are there to put the cards
in the three boxes so that the trick works?

Solution: There are $2 \cdot 3! = 12$ ways, which amount to:
\begin{itemize}
  \ii Partitioning the cards modulo $3$, or
  \ii Placing $1$ alone in a box,
  $100$ alone in a second box,
  and all remaining cards in the third box.
\end{itemize}
These are easily checked to work so we prove they are the only ones.

\paragraph{First solution.}
We proceed by induction on $n \ge 3$ with the base case being immediate.

For the inductive step,
consider a working partition of $\{1, 2, \dots, n\}$.
Then either $n$ is in its own box; or
deleting $n$ gives a working partition of $\{1, 2, \dots, n-1\}$.
Similarly, either $1$ is in its own box; or
deleting $1$ gives a working partition of $\{2, 3, \dots, n\}$,
and we can reduce all numbers by $1$ to get
a working partition of $\{1, 2, \dots, n-1\}$.

Therefore, we only need to consider there cases.
\begin{itemize}
  \ii If $1$ and $n$ are both in their own box,
  this yields one type of solution we already found.

  \ii If $n$ is not in a box by itself,
  then by induction hypothesis the cards $1$ through $n-1$
  are either arranged mod $3$,
  or as $\{1\} \cup \{2,3,\dots,n-2\} \cup \{n-1\}$.
  \begin{itemize}
    \ii In the former mod $3$ situation,
    since $n + (n-3) = (n-1) + (n-2)$,
    so $n$ must be in the same box as $n-3$.
    \ii In the latter case and for $n > 4$,
    since $n + 1 = 2 + (n-1)$,
    $n$ must be in the same box as $1$.
    But now $n + 2 = (n-1) + 3$ for $n > 4$, contradiction.
  \end{itemize}

  \ii The case where $1$ is in a box by itself is analogous.
\end{itemize}
This exhausts all cases, completing the proof.

\paragraph{Second solution.}
Let $A$, $B$, $C$ be the sets of cards in the three boxes.
Then $A+B$, $B+C$, $C+A$ should be disjoint,
and contained in $\{3, 4, \dots, 199\}$.
On the other hand, we have the following famous fact.
\begin{lemma*}
  Let $X$ and $Y$ be finite nonempty sets of real numbers.
  We have $|X+Y| \ge |X|+|Y|-1$,
  with equality if and only if $X$ and $Y$ are arithmetic
  progressions with the same common difference,
  or one of $X$ and $Y$ is a singleton set.
\end{lemma*}
Putting these two together gives the estimates
\[ 197 \ge |A+B| + |B+C| + |C+A|
  \ge 2\left( |A|+|B|+|C| \right)-3 = 197. \]
So all the inequalities must be sharp.
Consequently we conclude that:
\begin{claim*}
  Either the sets $A$, $B$, $C$ are disjoint arithmetic progressions
  with the same common difference
  $d = \min_{x \neq y \text{ in same set}} |x-y|$,
  or two of the sets are two singleton.
  Moreover, $\{3, 4, \dots, 199\}
    = (A+B) \sqcup (B+C) \sqcup (C+A)$.
\end{claim*}
From here it is not hard to deduce the layouts above are the only ones,
but there are some details.
First, we make the preliminary observation that
$3=1+2$, $4=1+3$, $198=98+100$, $199=99+100$
and these numbers can't be decomposed in other ways;
thus from the remark about the disjoint union:
\begin{claim*}
  [Convenient corollary]
  The pairs $(1,2)$, $(1,3)$, $(98,100)$, $(99,100)$
  are all in different sets.
\end{claim*}
We now consider the four cases.
\begin{itemize}
  \ii If two of the boxes are singletons,
  it follows from the corollary that we should have $A = \{1\}$,
  $B = \{100\}$ and $C = \{2, \dots, 99\}$, up to permutation.
  \ii Otherwise $A$, $B$, $C$ are disjoint arithmetic
  progressions with the same common difference $d$.
  As two of $\{1,2,3,4\}$ are in the same box
  (by pigeonhole), we must have $d \le 3$.
  \begin{itemize}
    \ii If $d=3$, then no two elements of different residues
    modulo $3$ can be in the same box,
    so we must be in the first construction claimed earlier.

    \ii If $d=2$, then the convenient corollary
    tells us we may assume WLOG that $1 \in A$ and $2 \in B$,
    hence $3 \in C$
    (since $3 \notin A$ by convenient corollary,
    and $3 \notin B$ because common difference $2$).
    Thus we must have $A = \{1\}$, $B = \{2, 4, \dots, 100\}$
    and $C = \{3, 5, \dots 99\}$
    which does not work since $1+4 = 2+3$.
    Therefore there are no solutions in this case.

    \ii If $d=1$, then by convenient corollary
    the numbers $1$ and $2$ are in different sets,
    as are $99$ and $100$.
    So we must have $A = \{1\}$, $B = \{2, \dots, 99\}$, $C = \{100\}$
    which we have already seen is valid.
  \end{itemize}
\end{itemize}