Submission #1325248

#TimeUsernameProblemLanguageResultExecution timeMemory
1325248riafhasan2010Gap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; long long findGap(int t, int n) { ll first, last, l = 0, ans = 0; MinMax(l, r, &first, &last); ll dif = last - first; ans = dif; l = first; for (ll i = l + 1; i < last; i += dif + 1) { ll mn, mx; MinMax(i, min(i + dif, last - 1), &mn, &mx); if (mn == -1) continue; ans = max(ans, mn - l); l = mx; } ans = max(ans, last - l); return ans; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:8:13: error: 'r' was not declared in this scope
    8 |   MinMax(l, r, &first, &last);
      |             ^