#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pi;
typedef long long int lint;
const int inf = 0x3f3f3f3f;
const int maxn = 1e5 + 10;
int n, maki;
int a[maxn], b[maxn];
map<int, int> m;
int main ()
{
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
cin >> 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) {
m[a[i] - b[i]]++;
m[b[i] - a[i]]++;
}
for(map<int, int>::iterator it = m.begin(); it != m.end(); ++it) {
maki = max(maki, it -> second);
}
cout << maki;
return 0;
}
//written and directed by pcelicamaja
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
2 |
Incorrect |
23 ms |
1656 KB |
Output isn't correct |
3 |
Incorrect |
20 ms |
1580 KB |
Output isn't correct |
4 |
Incorrect |
19 ms |
1664 KB |
Output isn't correct |
5 |
Correct |
29 ms |
2552 KB |
Output is correct |
6 |
Correct |
28 ms |
2552 KB |
Output is correct |
7 |
Correct |
32 ms |
2572 KB |
Output is correct |
8 |
Correct |
54 ms |
2552 KB |
Output is correct |
9 |
Correct |
71 ms |
3508 KB |
Output is correct |
10 |
Correct |
76 ms |
3448 KB |
Output is correct |