Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<climits>
- int main()
- {
- int n, max = INT_MIN, count = 0;
- scanf("%d", &n);
- int a[n];
- for (int i = 0; i < n; i++)
- {
- scanf("%d",&a[i]);
- if (a[i] > max)
- {
- max = a[i];
- count = 0;
- }
- if (a[i] == max)
- {
- count++;
- }
- }
- printf("%d", count);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement