2 solutions
-
0
`
#include<bits/stdc++.h> using namespace std; int a[1005]; int b[105]; int main(){ int n; bool q = 0; cin >> n; for(int i = 1;i <= n;i++){ cin >> a[i]; b[a[i] + 50]++; } for(int i = 0;i <= 100;i++){ if(b[i] > n / 2){ cout << b[i]; q = 1; break; } } if(q == 0) cout << "no" ; return 0; }
- 1
Information
- ID
- 672
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 6
- Tags
- # Submissions
- 21
- Accepted
- 11
- Uploaded By