Submission #1339420

#TimeUsernameProblemLanguageResultExecution timeMemory
1339420po_rag526Jarvis (COCI19_jarvis)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

int a[1000005], b[1000005];
map<int, int> mp;

int main()
{
    int n;
    cin >> n;
    for (i = 1; i <= n; i++) {
        cin >> a[i];
    }
    for (i = 1; i <= n; i++) {
        cin >> b[i];
        mp[a[i] - b[i]]++;
    }
    int ans = 0;
    for (auto [key, val] : mp) {
        ans = max(ans, val);
    }
cout << ans;
    return 0;
}

Compilation message (stderr)

jarvis.cpp: In function 'int main()':
jarvis.cpp:12:10: error: 'i' was not declared in this scope
   12 |     for (i = 1; i <= n; i++) {
      |          ^
jarvis.cpp:15:10: error: 'i' was not declared in this scope
   15 |     for (i = 1; i <= n; i++) {
      |          ^