Submission #445051

#TimeUsernameProblemLanguageResultExecution timeMemory
445051MahfuzAhmedJarvis (COCI19_jarvis)C++14
70 / 70
317 ms2112 KiB
#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 timeMemoryGrader output
Fetching results...