# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1127659 | Sunbae | Room Temperature (JOI24_ho_t1) | C++20 | 1 ms | 328 KiB |
#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
int a[N];
signed main(){
int n, t; scanf("%d %d", &n, &t);
for(int i = 0; i<n; ++i) scanf("%d", a+i);
map<int,int> mp;
for(int i = 0; i<n; ++i) ++mp[a[i] % t];
if(mp.size() == 1){ puts("0"); return 0;}
int mx = 0;
for(pair<int,int> it: mp) mx = max(mx, it.second);
printf("%d", mx);
}
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |