A class has $25$ students. The teacher wants to stock $N$ candies, hold the Olympics and give away all $N$ candies for success in it (those who solve equally tasks should get equally, those who solve less get less, including, possibly, zero candies). At what smallest $N$ this will be possible, regardless of the number of tasks on Olympiad and the student successes?
Problem
Source: St. Petersburg 2019 10.5
Tags: combinatorics, minimum
08.02.2021 16:45
This appeared on one of our preparation test during Bosnian winter camp. Here's my solution... Because teacher has to give all $N$ candies to students we have that $25|N$ because of the case where all students solve the same number of problems, so $N=25t$. Now consider the case where $24$ students solve $1$ problem and one student solves nothing. If we give $\leq t$ candies to those $24$ students the last one will recieve at least $t$ candies which is a contradiction, so we must give at least $t+1$ to them. Now we have that $24(t+1)\geq25t$ because it must be possible to select $24(t+1)$ candies from $25t$ candies. Now we will prove by induction that it is possible to award $k$ students according to problem's rules with $k(k-1)$ candies. Also we will make our induction hypothesis stronger and prove it is possible to do it with everyone recieving less than $2k$ candies. The base case $k=1$ is trivial. Now suppose that claim holds for all $1\leq i \leq k-1$ and let's prove the statement for $k$. If all students have solved the same number of problems we are done, otherwise we have $1\leq w<k$ winners who have solved the maximum number of problems and $l$ others where $w+l=k$. By induction we can solve those $l$ students in a way that any student of those $l$ recieves $<2l$ candies, that is $\leq 2k-2$ candies. Now we have to award $k(k-1)-l(l-1)=(k-l)(k+l-1)$ candies to $w=k-l$ winners. We five each of them $k+l-1$ candies and we know that because of $w\geq1, l\leq k-1$ that $k+l-1\geq2l$ and $k+l-1<2k$ so induction step is done.