#CCBCHBAHAI0000151. Nến sinh nhật (Birthday Cake Candles)
Nến sinh nhật (Birthday Cake Candles)
Birthday Cake Candles
Source: HackerRank
Version: Phuoc Hung OJ Extended
Problem Statement
There are candles and candle has height . Only candles whose height equals the maximum height are counted.
Let
Count the indices such that .
Input
- The first line contains an integer .
- The second line contains integers .
Output
Print one integer: the number of tallest candles.
Subtasks
Subtask 1 (100 points): ; .
Examples
Input
4
3 2 1 3
Output
2
Explanation
The maximum height is . Height occurs at indices and , so there are exactly tallest candles.