Problem: Determine all integers $m$ for which the $m \times m$ square can be dissected
into five rectangles, the side lengths of which are
the integers $1$, $2$, \dots, $10$ in some order.

Solution: The answer is that this is possible if and only if $m = 11$ or $m = 13$.

\paragraph{Constructions for $m=11$ and $m=13$.}
See the figures below.
\begin{center}
\begin{asy}
size(12cm);
picture p11, p13;
pen b = black+2.5;
filldraw(p11, box((0,0), (11,11)), palegreen, b);
filldraw(p11, box((0,0), (8,5)), palecyan, b);
filldraw(p11, box((7,9), (11,11)), palecyan, b);
filldraw(p11, box((8,0), (11,9)), palered, b);
filldraw(p11, box((0,5), (7,11)), palered, b);
for (int i=0; i<11; ++i) {
for (int j=0; j<11; ++j) {
  draw(p11, shift(i,j)*unitsquare, black);
}
}
add(p11);

filldraw(p13, box((0,0), (13,13)), palegreen, b);
filldraw(p13, box((0,0), (8,3)), palecyan, b);
filldraw(p13, box((6,4), (13,13)), palecyan, b);
filldraw(p13, box((8,0), (13,4)), palered, b);
filldraw(p13, box((0,3), (6,13)), palered, b);
for (int i=0; i<13; ++i) {
for (int j=0; j<13; ++j) {
  draw(p13, shift(i,j)*unitsquare, black);
}
}
add(shift(13,-1)*p13);
\end{asy}
\end{center}

\paragraph{Proof the task is impossible unless $11 \le m \le 13$.}
The total area of the rectangles is of the form $A = a_1 b_1 + \dots + a_5 b_5$
for $(a_1, \dots, b_5)$ a permutation of $(1, \dots, 10)$.
By applying the rearrangement inequality repeatedly one can prove that
\[ A \le 1 \cdot 2 + 3 \cdot 4 + 5 \cdot 6 + 7 \cdot 8 + 9 \cdot 10 = 190. \]
Analogously, we can get a matching lower bound
\[ A \ge 1 \cdot 10 + 2 \cdot 9 + 3 \cdot 8 + 4 \cdot 7 + 5 \cdot 6 = 110. \]
Since $A = m^2$ for integer $m$, it follows $11 \le m \le 13$.

\paragraph{Proof the task is impossible for $m=12$.}
It remains to rule out such a tiling for a $12 \times 12$ square.
We start with the following structure claim:
\begin{claim*}
  Any tiling for $m > 10$ must either be the spiral pattern below or a reflection of it.
  \begin{center}
  \begin{asy}
    size(3cm);
    draw(box((0,0),(7,7)), black+1.5);
    draw((0,2)--(5,2), black+1);
    draw((5,0)--(5,4), black+1);
    draw((3,4)--(7,4), black+1);
    draw((3,7)--(3,2), black+1);
  \end{asy}
  \end{center}
\end{claim*}
\begin{proof}
  Label the square $ABCD$.
  Because $m > 10$, each corner of the square must be part of a different rectangle.
  Consider the rectangle covering $A$, and let the vertex opposite $A$ be $A'$.
  Define $B'$, $C'$, $D'$ similarly.

  We contend that no two of $A'$, $B'$, $C'$, $D'$ coincide.
  Indeed, if $A' = C'$, then we get the figure on the left where the two
  purple rectangles are part of the tiling.
  The remaining two ``quadrants'' must be dissected into three rectangles,
  but there is general a quadrant cannot be divided into either $2$ or $3$ rectangles
  in aw way that doesn't create two equal lengths.
  \begin{center}
  \begin{asy}
    size(7cm);
    picture pl;
    draw(pl, box((0,0),(7,7)), black+1.5);
    label(pl, "$A$", (0,0), dir(225));
    label(pl, "$B$", (7,0), dir(315));
    label(pl, "$C$", (7,7), dir(45));
    label(pl, "$D$", (0,7), dir(135));
    dotfactor *= 2;
    picture pr = rotate(0)*pl;
    filldraw(pl, box((0,0), (5,3)), mediummagenta, black+1.5);
    filldraw(pl, box((7,7), (5,3)), mediummagenta, black+1.5);
    filldraw(pr, box((0,0), (5,3)), mediummagenta, black+1.5);
    filldraw(pr, box((5,3), (7,0)), mediummagenta, black+1.5);
    label(pl, "$A'=C'$", (5,3), dir(135));
    label(pr, "$A'=B'$", (5,3), dir(90));
    dot(pl, (5,3));
    dot(pr, (5,3));
    add(shift(0,0)*pl);
    add(shift(11,0)*pr);
  \end{asy}
  \end{center}
  Meanwhile, if $A' = B'$, the two purple rectangles
  already obviously have a common dimension (right figure).

  Hence $A'$, $B'$, $C'$, $D'$ are all different points.
  They must each be part of some rectangle not using the corner.
  Moreover, every rectangle in the dissection has at least one vertex
  not on the boundary of the square.
  So the fifth rectangle must be $A'B'C'D'$ exactly.
\end{proof}

Now on to the proof that $m = 12$ is impossible.
Assume for contradiction a construction exists and refer to the spiral figure above.
Note that because $12 > 1 + 10$,
the side length $1$ cannot belong to any edge of the outer $12 \times 12$ square.
This means that $1$ must be a side length of the center rectangle.
Moreover, because the outer square has perimeter $48$,
and we know $1+2+\dots+10 = 55$, the center rectangle has perimeter $7$.
In other words, the inner rectangle must be $1 \times 6$ exactly.
\begin{center}
\begin{asy}
  size(5cm);
  draw(box((0,0),(12,12)), black+1.5);
  draw((0,2)--(5,2), black+1);
  draw((5,0)--(5,8), black+1);
  draw((4,8)--(12,8), black+1);
  draw((4,12)--(4,2), black+1);
  label("$6$", (5,4), dir(0));
  label("$1$", (4.5,8), dir(90));
\end{asy}
\end{center}
Hence, we would need to partition the remaining numbers $\{2,3,4,5,7,8,9,10\}$
into eight pairs such that two pairs differ by $1$ and differ by $6$
(in the picture, the paired numbers are on opposite sides of the square).
Note that $7$ must be paired with $8$ (since $7 \pm 6$ and $7-1$ are not available)
and $5$ must be paired with $4$ (since $5 \pm 6$ and $5+1$ are not available).
But then the remaining pairs need to have difference $6$,
and there is no way to form two such pairs from $\{2,3,9,10\}$.
This produces the desired contradiction.