# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99889 | jvalsortav | Jarvis (COCI19_jarvis) | C++14 | 117 ms | 2076 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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
#include <set>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <utility>
#include <string>
#include <map>
//#include <sve_includeove>
using namespace std;
int n, mx, k;
vector <int> a, b;
set <int> s;
map <int, int> m;
int main() {
cin >> n;
for (int i = 0; i < n; i++){
cin >> k;
a.push_back(k);
}
for (int i = 0; i < n; i++){
cin >> k;
b.push_back(k);
}
for (int i = 0; i < n; i++){
s.insert(b[i] - a[i]);
m[b[i] - a[i]]++;
}
for (set <int> :: iterator it = s.begin(); it != s.end(); it++){
mx = max(mx, m[*it]);
}
cout << mx;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |