Submission #354923

#TimeUsernameProblemLanguageResultExecution timeMemory
354923blueGap (APIO16_gap)C++17
Compilation error
0 ms0 KiB
#include "gap.h" using namespace std; long long findGap(int T, int N) { long long res = 0; if(T == 1) { long long s, t; long long mn; long long mx; s = 0; t = 1000'000'000'000'000'000LL; MinMax(s, t, &mn, &mx); while(mn < mx) { s = mn + 1; t = mx - 1; MinMax(s, t, &mn, &mx); if(mn == -1) { if(N % 2 == 0) res = max(res, t - s + 2); break; } res = max(res, mn - (s-1)); res = max(res, (t+1) - mx); } } return res; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:27:38: error: 'max' was not declared in this scope; did you mean 'mx'?
   27 |                 if(N % 2 == 0) res = max(res, t - s + 2);
      |                                      ^~~
      |                                      mx
gap.cpp:31:19: error: 'max' was not declared in this scope; did you mean 'mx'?
   31 |             res = max(res, mn - (s-1));
      |                   ^~~
      |                   mx