#include <bits/stdc++.h>
using namespace std;
int main()
{
map<int,int>m;
int n;
cin>>n;
int a[n];
int b[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
for(int i=0;i<n;i++)
{
cin>>b[i];
}
int maks=0;
for(int i=0;i<n;i++)
{
m[a[i]-b[i]]++;
if(m[a[i]-b[i]]>maks)
{
maks=m[a[i]-b[i]];
}
}
cout<<maks<<endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
256 KB |
Output is correct |
2 |
Correct |
61 ms |
1528 KB |
Output is correct |
3 |
Correct |
63 ms |
1528 KB |
Output is correct |
4 |
Correct |
60 ms |
1616 KB |
Output is correct |
5 |
Correct |
119 ms |
2552 KB |
Output is correct |
6 |
Correct |
122 ms |
2548 KB |
Output is correct |
7 |
Correct |
128 ms |
2552 KB |
Output is correct |
8 |
Correct |
127 ms |
2584 KB |
Output is correct |
9 |
Correct |
146 ms |
3064 KB |
Output is correct |
10 |
Correct |
145 ms |
3064 KB |
Output is correct |