Submission #404454

#TimeUsernameProblemLanguageResultExecution timeMemory
404454CursedCodeGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int findGap(int t, int n){ long long L, R; MinMax(0LL, 1e18, &L, &R); long long x = (R - L + n - 2) / (n - 1); long long ans = x; long long last = L; for(long long i = L + 1; i < R; i += x){ long long mn, mx; MinMax(i, min(i + x - 1, R), &mn, &mx); if(mn != -1){ ans = max(ans, mn - last); last = mx; } } return ans; }

Compilation message (stderr)

gap.cpp: In function 'int findGap(int, int)':
gap.cpp:7:3: error: 'MinMax' was not declared in this scope
    7 |   MinMax(0LL, 1e18, &L, &R);
      |   ^~~~~~