Submission #200003

#TimeUsernameProblemLanguageResultExecution timeMemory
200003KLPPJarvis (COCI19_jarvis)C++14
70 / 70
114 ms4592 KiB
#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 timeMemoryGrader output
Fetching results...