#include <bits/stdc++.h>
using namespace std;
int n, a[100005], b[100005];
map<int, int> m;
int main() {
cin >> n;
for (int i = 0; i < n; i++) cin >> a[i];
for (int i = 0; i < n; i++) cin >> b[i];
int ans = 1;
for (int i = 0; i < n; i++) {
m[b[i] - a[i]] += 1;
ans = max(ans, m[b[i] - a[i]]);
}
cout << ans << '\n';
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
26 ms |
1548 KB |
Output is correct |
3 |
Correct |
33 ms |
1488 KB |
Output is correct |
4 |
Correct |
26 ms |
1520 KB |
Output is correct |
5 |
Correct |
52 ms |
2408 KB |
Output is correct |
6 |
Correct |
55 ms |
2508 KB |
Output is correct |
7 |
Correct |
58 ms |
2488 KB |
Output is correct |
8 |
Correct |
58 ms |
2456 KB |
Output is correct |
9 |
Correct |
68 ms |
2952 KB |
Output is correct |
10 |
Correct |
68 ms |
2952 KB |
Output is correct |