/*
ID: noszaly1
TASK: {TASK}
LANG: C++11
*/
//Noszály Áron 11o Debreceni Fazekas Mihály Gimnázium
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<cassert>
#include<cassert>
#include<unordered_map>
#include<unordered_set>
#include<functional>
#include<queue>
#include<stack>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<sstream>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<numeric>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define xx first
#define yy second
#define sz(x) (int)(x).size()
#define gc getchar
#define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define mp make_pair
#ifndef ONLINE_JUDGE
# define LOG(x) (cerr << #x << " = " << (x) << endl)
#else
# define LOG(x) ((void)0)
#endif
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const double PI=acos(-1);
template<typename T> T getint() {
T val=0;
char c;
bool neg=false;
while((c=gc()) && !(c>='0' && c<='9')) {
neg|=c=='-';
}
do {
val=(val*10)+c-'0';
} while((c=gc()) && (c>='0' && c<='9'));
return val*(neg?-1:1);
}
int diff[5000000];
int main() {
IO;
int n;
cin>>n;
vector<int> a(n),b(n);
for(int i=0;i<n;++i) {
cin>>a[i];
}
for(int i=0;i<n;++i) {
cin>>b[i];
}
for(int i=0;i<n;++i) {
diff[b[i]-a[i]+2000000]++;
}
cout<<*max_element(diff, diff+5000000)<<"\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
376 KB |
Output is correct |
2 |
Correct |
26 ms |
1144 KB |
Output is correct |
3 |
Correct |
22 ms |
1180 KB |
Output is correct |
4 |
Correct |
22 ms |
1272 KB |
Output is correct |
5 |
Correct |
30 ms |
1144 KB |
Output is correct |
6 |
Correct |
29 ms |
1272 KB |
Output is correct |
7 |
Correct |
32 ms |
1528 KB |
Output is correct |
8 |
Correct |
33 ms |
1528 KB |
Output is correct |
9 |
Correct |
32 ms |
5108 KB |
Output is correct |
10 |
Correct |
32 ms |
5112 KB |
Output is correct |