#C4860. Player Ranking
Player Ranking
Player Ranking
You are given the scores of existing players and a new player's score. Your task is to determine the rank of the new player after adding their score to the list of existing scores. The ranking is determined in descending order: the highest score is ranked 1. In case of a tie, the new player's rank is determined by the first occurrence in the sorted order. For example, if the scores are sorted in descending order and the new player's score appears at index i (0-indexed), then their rank is i+1.
The input consists of three lines. The first line contains an integer n which is the number of existing players. The second line contains n space-separated integers representing the scores. The third line contains the new player's score.
inputFormat
The input is provided via standard input (stdin) in the following format:
- The first line contains an integer n — the number of existing players.
- The second line contains n space-separated integers — the scores of the players.
- The third line contains an integer — the new player's score.
outputFormat
Output a single integer via standard output (stdout) which is the rank of the new player's score after being added to the list.
## sample5
100 200 150 120 180
130
4
</p>