The tests for this problem consist of nine groups. Points for each group are awarded only if all tests in the group and all tests in some of the previous groups are passed. Note that passing the tests from the statement is not required for some groups. \textbf{Offline verification} means that the results of testing your solution on this group will only be available after the competition ends. The final score for each group is equal to the maximum score obtained for that group of tests across all submitted solutions.

\medskip
\begin{center}
\begingroup
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
& & \multicolumn{2}{c|}{Additional constraints} & & \\
\cline{3-4}
\raisebox{2.25ex}[0cm][0cm]{Group}
& \raisebox{2.25ex}[0cm][0cm]{Points}
& $n$ & $k$
& \raisebox{2.25ex}[0cm][0cm]{\parbox{3cm}{\centering Required groups}}
& \raisebox{2.25ex}[0cm][0cm]{Comment}
\\
\hline
0 & 0 & -- & -- & -- & Tests from the statement. \\
\hline
1 & 12 & $n \le 10$ & $k \le 10$ & 0 & \\
\hline
2 & 13 & $n \le 500$ & $k \le 500$ & 0, 1 & \\
\hline
3 & 9 & -- & $k = 1$ & -- & \\
\hline
4 & 10 & -- & -- & -- & \parbox{4.8cm}{\centering \vspace{2mm} {$p_i = i - 1$}\vspace{2mm}} \\
\hline
5 & 13 & -- & -- & 4 & \parbox{4.8cm}{\centering \vspace{2mm} {Each floor is connected to no more than two floors with a higher number}\vspace{2mm}} \\
\hline
6 & 14 & $n \le 200\,000$ & $k \le 500$ & 0 -- 2& \\
\hline
7 & 11 & -- & $k \le 500$ & 0 -- 3, 6 & \\
\hline
8 & 10 & -- & $k \le 1000$ & 0 -- 3, 6, 7 & \\
\hline
9 & 8 & -- & -- & 0 -- 8 & \textbf{Offline verification} \\
\hline
\end{tabular}
\endgroup
\end{center}