Submission #227075

#TimeUsernameProblemLanguageResultExecution timeMemory
227075DavidDamianJarvis (COCI19_jarvis)C++11
70 / 70
47 ms2552 KiB
#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 timeMemoryGrader output
Fetching results...