Submission #1260576

#TimeUsernameProblemLanguageResultExecution timeMemory
1260576julia_08Gap (APIO16_gap)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; using ll = long long; const int MAXN = 1e5 + 10; ll a[MAXN]; ll findGap(int t, int n){ int l = 1, r = n; ll cur_s = 0, cur_t = 1e18; while(l < r){ ll mn = s, mx = t; MinMax(cur_s, cur_t, mn, mx); a[l] = mn; a[r] = mx; cur_s = a[l] + 1; cur_t = a[r] - 1; l ++; r --; } ll ans = 0; for(int i=1; i<n; i++) ans = max(ans, a[i + 1] - a[i]); return ans; }

Compilation message (stderr)

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:20:13: error: 's' was not declared in this scope
   20 |     ll mn = s, mx = t;
      |             ^
gap.cpp:22:30: error: 'mx' was not declared in this scope; did you mean 'mn'?
   22 |     MinMax(cur_s, cur_t, mn, mx);
      |                              ^~
      |                              mn