#C7840. Minimum Students Without a Tutor
Minimum Students Without a Tutor
Minimum Students Without a Tutor
You are given N students along with their proficiency levels. A student can only be tutored by another student if the tutor's proficiency is strictly higher. In other words, only those students with the maximum proficiency level cannot find a tutor.
Formally, let \(P = [P_1, P_2, \dots, P_N]\) be the proficiency levels. Let \(M = \max_{1 \le i \le N} P_i\). The answer is given by:
\[ \text{answer} = \sum_{i=1}^{N} \mathbf{1}_{\{P_i = M\}} \]Calculate and output the minimum number of students who cannot be paired with a tutor.
inputFormat
The input is given via stdin and consists of two lines. The first line contains a single integer N representing the number of students. The second line contains N space-separated integers where the i-th integer denotes the proficiency level of the i-th student.
outputFormat
Output a single integer via stdout: the minimum number of students who are unable to find a tutor.
## sample5
4 3 5 1 2
1