  An edge colouring of $K_n$ with $k$ colours is a Gallai $k$-colouring if it
does not contain any rainbow triangle. Gy\'arf\'as, P\'alv\"olgyi, Patk\'os and
Wales proved that there exists a number $g(k)$ such that $n\geq g(k)$ if and
only if for any colour distribution sequence $(e_1,\cdots,e_k)$ with
$\sum_{i=1}^ke_i=\binom{n}{2}$, there exist a Gallai $k$-colouring of $K_n$
with $e_i$ edges having colour $i$. They also showed that
$\Omega(k)=g(k)=O(k^2)$ and posed the problem of determining the exact order of
magnitude of $g(k)$. Feffer, Fu and Yan improved both bounds significantly by
proving $\Omega(k^{1.5}/\log k)=g(k)=O(k^{1.5})$. We resolve this problem by
showing $g(k)=\Theta(k^{1.5}/(\log k)^{0.5})$.
