Tests for this problem consist of four groups.

Points for each of the first three groups are awarded only if all tests in the group are passed and all tests in some of the previous groups. The score for the last group equals the minimum of the scores obtained for each test in the fourth group.

For each test, let $N$ be the sum of $n$ across all input data sets, and $Q$ be the limit on the total number of calls to the function \t{min\_value} across all input data sets.

\begin{center}
\begingroup
\renewcommand{\arraystretch}{1.5}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
& & \multicolumn{2}{c|}{Constraints} & & \\
\cline{3-4}
\raisebox{2.25ex}[0cm][0cm]{Group}
& \raisebox{2.25ex}[0cm][0cm]{Points}
& $N$ & $Q$
& \raisebox{2.25ex}[0cm][0cm]{\parbox{2cm}{\centering Required}}
& \raisebox{2.25ex}[0cm][0cm]{Comment}
\\
\hline
0 & 0 & -- & $Q = 4950$ & -- & Samples \\
\hline
1 & 10 & $N \le 100$ & $Q = 4950$ & & $p_{2i-1} = \frac{n-1}{2} + i$ for $1 \le i \le \frac{n+1}{2}$ \\
\hline
2 & 20 & $N \le 100$ & $Q = 4950$ & 0, 1 & \\
\hline
3 & 20 & $N \le 1\,000$ & $Q = 100\,000$ & 0, 1, 2 & \\
\hline
4 & 60 & $N \le 30\,000$ & $Q = 1\,000\,000$ & -- &  \\
\hline
\end{tabular}
\endgroup
\end{center}

The last group is scored according to the formula. If you made $x$ queries in the test, your score will be:

$$
\textrm{score} = \min \left( 60, \, \left \lfloor 95 \cdot \left( 1 - \frac{x}{10^6} \right) \right \rfloor \right)
$$

Your score for the last group equals the minimum of the scores obtained on the tests in the fourth group.