# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445051 | MahfuzAhmed | Jarvis (COCI19_jarvis) | C++14 | 317 ms | 2112 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;
int main() {
int n; cin >> n;
int arrA[n], arrB[n];
vector<int> vec;
map<int, int> mp;
for(int i = 0; i < n; i++)
cin >> arrA[i];
for(int i = 0; i < n; i++){
cin >> arrB[i];
int diff = arrB[i] - arrA[i];
mp[diff]++;
vec.push_back(diff);
}
sort(vec.begin(), vec.end(), [&](int a, int b){
return mp[a] > mp[b];
});
cout << mp[vec[0]] << "\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |