#include #include #include #include int main() { int n, i = 0, candlesToBlow = 0, topHeight = 0, validHeight; do{ scanf("%d", &n); }while(n < 1 || n > pow(10, 5) ); int height[n]; while(i < n && scanf("%d", &height[i]) == 1){ i++; } for(i = 0; i < n; i++){ if(height[i] >= 1 && height[i] <= pow(10, 7)){ if(height[i] > topHeight){ candlesToBlow = 1; topHeight = height[i]; } else if(height[i] == topHeight){ candlesToBlow++; } } } printf("%d", candlesToBlow); /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }