\begin{enumerate}
\item ($4$ points): $n \le 3$;
\item ($8$ points): $n, q \le 10^3$;
\item ($5$ points): $n \le 10^3$;
\item ($17$ points): $n, q \le 10^5$;
\item ($14$ points): $n \le 10^5$;
\item ($5$ points): $a_i \le 20$;
\item ($7$ points): $a_i \le 10^3$;
\item ($16$ points): $l = 1$;
\item ($24$ points): no additional constraints.
\end{enumerate}