#include<bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int n, sol;
int a[MAXN], b[MAXN];
unordered_map <int, int> mp;
int main () {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> n;
for (int i=1; i<=n; i++) {
cin >> a[i];
}
for (int i=1; i<=n; i++) {
cin >> b[i];
mp[b[i] - a[i]]++;
}
for (auto it : mp) {
sol = max(sol, it.second);
}
cout << sol;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
17 ms |
1144 KB |
Output is correct |
3 |
Correct |
17 ms |
1144 KB |
Output is correct |
4 |
Correct |
18 ms |
1144 KB |
Output is correct |
5 |
Correct |
27 ms |
1144 KB |
Output is correct |
6 |
Correct |
25 ms |
1144 KB |
Output is correct |
7 |
Correct |
24 ms |
1144 KB |
Output is correct |
8 |
Correct |
25 ms |
1128 KB |
Output is correct |
9 |
Correct |
31 ms |
1656 KB |
Output is correct |
10 |
Correct |
31 ms |
1568 KB |
Output is correct |