In this problem, there are conditional blocks. If your solution works correctly for certain constraints, it will receive a certain number of points. Please note that the evaluation is still in the testing phase.

\begin{enumerate}
\item ($29$ points): $n\le 100$, $q\le100$;
\item ($36$ points): $n\le 10\,000$, $q\le 100$;
\item ($35$ points): without additional constraints.
\end{enumerate}