Submission #824143

# Submission time Handle Problem Language Result Execution time Memory
824143 2023-08-13T15:23:08 Z Trisanu_Das Jarvis (COCI19_jarvis) C++17
70 / 70
68 ms 2952 KB
#include <bits/stdc++.h>
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 << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 26 ms 1548 KB Output is correct
3 Correct 33 ms 1488 KB Output is correct
4 Correct 26 ms 1520 KB Output is correct
5 Correct 52 ms 2408 KB Output is correct
6 Correct 55 ms 2508 KB Output is correct
7 Correct 58 ms 2488 KB Output is correct
8 Correct 58 ms 2456 KB Output is correct
9 Correct 68 ms 2952 KB Output is correct
10 Correct 68 ms 2952 KB Output is correct