Submission #445087

#TimeUsernameProblemLanguageResultExecution timeMemory
445087RaadSharar777Jarvis (COCI19_jarvis)C++17
70 / 70
90 ms2032 KiB
#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 timeMemoryGrader output
Fetching results...