You are viewing a single comment's thread. Return to all comments →
int main(){ int n; cin >> n; long int height[n], max = 0, count = 0; for(int i = 0; i < n; i++){ cin >> height[i]; if(height[i] > max) max = height[i]; } for(int i = 0; i < n; i++){ if(height[i] == max) count++; } cout << count; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →