Submission #232462

#TimeUsernameProblemLanguageResultExecution timeMemory
232462NONAMEJarvis (COCI19_jarvis)C++17
70 / 70
44 ms1152 KiB
#include <bits/stdc++.h> #define sz(x) int(x.size()) #define in(x) freopen(x, "r", stdin) #define out(x) freopen(x, "w", stdout) #define N 100500 #define oo ll(1e16) #define ft first #define sd second #define mp make_pair #define pb push_back #define ppb pop_back #define el '\n' #define elf endl #define base ll(1e9 + 7) using namespace std; typedef long long ll; typedef long double ld; int n, a[N]; map <int, int> m; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // in("input.txt"); cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) { int x; cin >> x; m[x - a[i]]++; } int ans = 0; for (map <int, int> :: iterator it = m.begin(); it != m.end(); it++) ans = max(ans, it -> sd); cout << ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...