#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
#include <set>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <utility>
#include <string>
#include <map>
//#include <sve_includeove>
using namespace std;
int n, mx, k;
vector <int> a, b;
set <int> s;
map <int, int> m;
int main() {
cin >> n;
for (int i = 0; i < n; i++){
cin >> k;
a.push_back(k);
}
for (int i = 0; i < n; i++){
cin >> k;
b.push_back(k);
}
for (int i = 0; i < n; i++){
s.insert(b[i] - a[i]);
m[b[i] - a[i]]++;
}
for (set <int> :: iterator it = s.begin(); it != s.end(); it++){
mx = max(mx, m[*it]);
}
cout << mx;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
384 KB |
Output is correct |
2 |
Correct |
40 ms |
1528 KB |
Output is correct |
3 |
Correct |
51 ms |
1520 KB |
Output is correct |
4 |
Correct |
40 ms |
1520 KB |
Output is correct |
5 |
Correct |
77 ms |
1520 KB |
Output is correct |
6 |
Correct |
76 ms |
1520 KB |
Output is correct |
7 |
Correct |
80 ms |
1520 KB |
Output is correct |
8 |
Correct |
83 ms |
1484 KB |
Output is correct |
9 |
Correct |
117 ms |
2076 KB |
Output is correct |
10 |
Correct |
106 ms |
2032 KB |
Output is correct |