#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld double
#define FOR(L , R) for(int i = L;i <= R;i++)
const int INF = 1e18;
const int sz = 2e5 + 5;
const int usz = 1e6 + 5;
const int mod = 998244353;
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int ans = 0;
int n , q;
cin >> n >> q;
vector < int > a(q);
map < int , int > cnt;
int maks = -1;
for(int i = 0;i < q;i++){
cin >> a[i];
cnt[a[i]]++;
maks = max(maks , cnt[a[i]]);
}
cout << maks - 1 << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |