公式

A - All Winners 解説 by evima


Let \(A_1,A_2,\dots,A_N\) be the number of players who won the perfect record prize from each team, arranged in descending order. Then: \(\\2A_i \leq A_1+A_i\leq M \; (i=2,3,\dots,N)\\\) \(\\A_i \leq \lfloor \frac{M}{2}\rfloor \; (i=2,3,\dots,N),\\\) so \(\\\sum_{i=1}^{N}{A_i} \leq M + (N-2) \lfloor \frac{M}{2}\rfloor.\\\)

Also, the equality holds when \(\\A_i=\begin{cases} \lceil \frac{M}{2}\rceil (i = 1) \\ \lfloor \frac{M}{2}\rfloor (i < 1) \end{cases},\\\) and \(A_i+A_j \leq M\) holds for any \(i,j \; (i\neq j)\), so we can determine the match results to satisfy this condition.
Therefore, the answer is \(M + (N-1) \lfloor \frac{M}{2}\rfloor\).

投稿日時:
最終更新: