#include #include #include #include #include #include #include int comp(const void*, const void*); int main(){ int n; scanf("%d",&n); int *height = malloc(sizeof(int) * n); for(int height_i = 0; height_i < n; height_i++){ scanf("%d",&height[height_i]); } qsort(height, n, sizeof(int), comp); int count = 1; int max = height[count - 1]; while((height[count] == max) && (count < n)){ count++; } printf("%d", count); return 0; } int comp(const void * a, const void * b){ int *x = (int*) a; int *y = (int*) b; return *y - *x; }