답안 #445087

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
445087 2021-07-16T11:36:02 Z RaadSharar777 Jarvis (COCI19_jarvis) C++17
70 / 70
90 ms 2032 KB
#include <bits/stdc++.h>
using namespace std;
unordered_map<int, int> numbers;
int main()
{
    int n;
    cin >> n;
    int oldarr[n],mx = 0;
    for (int i = 0; i < n; i++) {
        cin >> oldarr[i];
    }
    for (int i = 0; i < n; i++) {
        int k;
        cin >> k;
        k -= oldarr[i];
        if (numbers.find(k) == numbers.end()) {
            numbers[k] = 1;
        } else {
            numbers[k]++;
        }
        mx = max(mx, numbers[k]);
    }
    cout << mx << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 45 ms 1044 KB Output is correct
3 Correct 57 ms 1048 KB Output is correct
4 Correct 44 ms 1040 KB Output is correct
5 Correct 73 ms 1644 KB Output is correct
6 Correct 79 ms 1572 KB Output is correct
7 Correct 84 ms 1624 KB Output is correct
8 Correct 82 ms 1648 KB Output is correct
9 Correct 90 ms 1988 KB Output is correct
10 Correct 81 ms 2032 KB Output is correct