제출 #1339429

#제출 시각아이디문제언어결과실행 시간메모리
1339429po_rag526Jarvis (COCI19_jarvis)C++17
70 / 70
16 ms5036 KiB
#include <bits/stdc++.h>

using namespace std;

const int NMAX = 1e5+5;
const int VMAX = 2e6+5;

int n, a[NMAX], b[NMAX];
int fr[2 * VMAX];

void read() {
   cin >> n;
   for (int i = 1; i <= n; i++) {
      cin >> a[i];
   }
   for (int i = 1; i <= n; i++) {
      cin >> b[i];
   }
}

int solve() {
   int ans = 0;
   for (int i = 1; i <= n; i++) {
      ans = max(ans, ++fr[a[i] - b[i] + VMAX]);
   }
   return ans;
}

signed main() {
#ifdef LOCAL
   freopen("input.txt", "r", stdin);
#endif

   ios_base::sync_with_stdio(false);
   cin.tie(0);
   cout.tie(0);

   read();
   cout << solve() << '\n';

   return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...