Submission #68191

#TimeUsernameProblemLanguageResultExecution timeMemory
68191gusfringGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; typedef long long ll; const int MAXN = 1e5 + 5; const ll MAXA = 1000000000000000000LLU; ll mn, mx; void MinMax(ll s, ll t, ll &mn, ll &mx); ll solve(ll lo, ll hi){ if(lo >= hi) return 0; unsigned long long x = (1LLU * lo + hi) / 2; ll mid = (ll)(x), mn1 = -1, mx1 = -1, mn2 = -1, mx2 = -1; MinMax(lo, mid, mn1, mx1); if(mid < hi) MinMax(mid + 1, hi, mn2, mx2); ll res = 0, r1 = 0, r2 = 0; if(mx1 != -1 && mx2 != -1) res = mn2 - mx1; if(mx2 != -1) r2 = solve(mid + 1, hi); if(mx1 != -1) r1 = solve(lo, mid); return max({res, r1, r2}); } long long findGap(int T, int N){ return solve(0, MAXA); }

Compilation message (stderr)

/tmp/cc0UsBSp.o: In function `solve(long long, long long) [clone .part.4]':
gap.cpp:(.text+0x70): undefined reference to `MinMax(long long, long long, long long&, long long&)'
gap.cpp:(.text+0x11a): undefined reference to `MinMax(long long, long long, long long&, long long&)'
collect2: error: ld returned 1 exit status