답안 #96990

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
96990 2019-02-13T08:07:24 Z Danylo99 Jarvis (COCI19_jarvis) C++17
70 / 70
56 ms 3064 KB
#include <bits/stdc++.h>
#define ll long long
#define LL long long
#define PB push_back
#define INF 2000000000
#define X first
#define Y second
using namespace std;
const LL mod = 998244353;
const LL MAX = 600005;
int a[100005];
int b[100005];
map<int , int> m;
int main()
{
    //freopen("input.txt" , "r" , stdin);
    ios_base::sync_with_stdio(0);
    int n;
    cin >> n;
    for(int i = 0; i < n; i++)
        cin >> a[i];
    for(int j = 0; j < n; j++)
        cin >> b[j];
    for(int i = 0; i < n; i++)
        m[b[i] - a[i]]++;
    int ans = 0;
    for(auto x : m)
        ans = max(ans , x.Y);
    cout << ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 22 ms 1656 KB Output is correct
3 Correct 20 ms 1656 KB Output is correct
4 Correct 20 ms 1536 KB Output is correct
5 Correct 29 ms 2560 KB Output is correct
6 Correct 30 ms 2552 KB Output is correct
7 Correct 32 ms 2560 KB Output is correct
8 Correct 33 ms 2548 KB Output is correct
9 Correct 56 ms 3064 KB Output is correct
10 Correct 39 ms 3064 KB Output is correct