# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445087 | RaadSharar777 | Jarvis (COCI19_jarvis) | C++17 | 90 ms | 2032 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;
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;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |