夫四、(35 points) A school has $n$ computers, each placed in one of $n$ rooms, with each room having a unique key. A training class has $m$ students $(m>n)$, and every evening exactly $n$ students enter the computer rooms for practical operation. To ensure that each person has one computer, what is the minimum number of keys that should be prepared and distributed to these $m$ students, so that no matter which $n$ people enter the computer rooms each evening, they can use the keys they have been given to open the door of one room and enter to practice, and according to the principle that those with fewer keys open the door first, each person can get exactly one room.
Note: First design a key distribution scheme, then prove that the scheme is optimal (the fewest total keys and meets the requirements).

First, distribute $n$ different keys of $n$ rooms to $n$ students, one key per person ($n$ people can use the key they receive to open one room). The remaining $m-n$ people can each receive $n$ keys (keys to all rooms). These people have more keys, so as long as no one is in a room, they can enter. This scheme requires a total of $n + (m-n) \cdot n = n(m-n+1)$ keys.

Next, we prove that this scheme is optimal. Assume the total number of keys $s_{i} < n(m-n+1)$. By the pigeonhole principle, there must be a room where the number of keys $s_{i} < m-n + 1 \leq m-n$. The keys to this room can be distributed to at most $m-n$ students. Since only $n$ students use the computer room each day, there are also $m-n$ students who do not use the computer room. If all the students who receive the key to this room do not use the computer room, then the door to this room cannot be opened, and the conditions of the problem cannot be met. Therefore, this scheme is optimal. That is, at least $n(m-n+1)$ keys should be prepared and distributed to the students to meet the requirements of the problem.
(Gan Chaoyi, provided)