# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
200003 | KLPP | Jarvis (COCI19_jarvis) | C++14 | 114 ms | 4592 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;
typedef long long int lld;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define trav(a,v) for(auto a:v)
lld a[1000000];
lld b[1000000];
int main() {
int n;
cin>>n;
rep(i,0,n)cin>>a[i];
rep(i,0,n)cin>>b[i];
vector<lld>v;
rep(i,0,n){
v.push_back(a[i]-b[i]);
}
sort(v.begin(),v.end());
int ans=0;
int cnt=0;
rep(i,0,n){
cnt++;
ans=max(ans,cnt);
if(i<n-1 && v[i]!=v[i+1])cnt=0;
}
cout<<ans<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |