#K52537. Count Higher Scores
Count Higher Scores
Count Higher Scores
Given a list of scores of participants and Jane's score, your task is to count the number of participants who scored strictly higher than Jane.
Formally, if the participant scores are given as a sequence of integers \(a_1, a_2, \dots, a_n\) and Jane's score is \(s\), you need to compute the number of indices \(i\) such that \(a_i > s\).
inputFormat
The input is read from standard input (stdin) and consists of three parts:
- The first line contains an integer \(n\) representing the number of participants.
- The second line contains \(n\) space-separated integers representing the scores of the participants. If \(n = 0\), this line will be empty.
- The third line contains an integer representing Jane's score.
outputFormat
Output a single integer to standard output (stdout) — the count of participants whose scores are strictly greater than Jane's score.
## sample5
450 400 350 300 500
420
2
</p>