#include #include #include #include #include using namespace std; int countMax(vector arr, int max_height) { int cnt = 0; for(int i = 0; i < arr.size(); i++) { if(arr[i] == max_height) cnt++; } return cnt; } int findMax(vector arr) { int max = 0; for(int i = 0; i < arr.size(); i++) { if( max < arr[i] ) max = arr[i]; } return max; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; cin >> n; vector candle(n); for(int i = 0; i < n; i++) cin >> candle[i]; int max_height = findMax(candle); int cnt_max = countMax(candle, max_height); cout << cnt_max; return 0; }