답안 #445155

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
445155 2021-07-16T16:38:32 Z colossal_pepe Jarvis (COCI19_jarvis) C++17
70 / 70
102 ms 2628 KB
#include <iostream>
#include <map>
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 << endl;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 332 KB Output is correct
2 Correct 45 ms 1540 KB Output is correct
3 Correct 44 ms 1496 KB Output is correct
4 Correct 42 ms 1432 KB Output is correct
5 Correct 77 ms 2120 KB Output is correct
6 Correct 82 ms 2244 KB Output is correct
7 Correct 84 ms 2172 KB Output is correct
8 Correct 84 ms 2236 KB Output is correct
9 Correct 102 ms 2600 KB Output is correct
10 Correct 101 ms 2628 KB Output is correct