# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147506 | ipaljak | Jarvis (COCI19_jarvis) | C++14 | 51 ms | 3064 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define TRACE(x) cerr << #x << " " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define _ << " " <<
typedef long long llint;
const int MOD = 1e9 + 7;
const int MAXN = 1e5 + 10;
int n;
int a[MAXN], b[MAXN];
map<int, int> cnt;
int main(void) {
scanf("%d", &n);
for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
for (int i = 0; i < n; ++i) scanf("%d", &b[i]);
for (int i = 0; i < n; ++i) cnt[a[i] - b[i]]++;
int sol = 0;
for (const auto &kv : cnt) sol = max(sol, kv.second);
printf("%d\n", sol);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |