# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
227075 | DavidDamian | Jarvis (COCI19_jarvis) | C++11 | 47 ms | 2552 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int n;
int A[100005];
map<int,int> bucket;
typedef pair<int,int> pii;
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);
cin>>n;
for(int i=0;i<n;i++){
cin>>A[i];
}
for(int i=0;i<n;i++){
int B;
cin>>B;
int diff=B-A[i];
bucket[diff]++;
}
pii maximum=make_pair(0,0);
for(pii p: bucket){
if(p.second>maximum.second){
maximum=p;
}
}
cout<<maximum.second<<'\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |