Submission #835642

#TimeUsernameProblemLanguageResultExecution timeMemory
835642aykhnGap (APIO16_gap)C++14
0 / 100
42 ms1104 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll findGap(int asdposjidfjioafg, int n) { ll f = 0, l = 0; MinMax(0LL, 1LL * 1e18, &f, &l); ll last = l; ll add = (l - f)/(n - 1); ll lim = (l - f - n + 1); ll res = 0; while (f < last) { ll lx, rx; lx = f; rx = l; MinMax(f + 1, f + add, &lx, &rx); if (lx == -1) { add *= 2; } else { res = max(res, lx - f); f = rx; } } return res; }

Compilation message (stderr)

gap.cpp: In function 'll findGap(int, int)':
gap.cpp:14:8: warning: unused variable 'lim' [-Wunused-variable]
   14 |     ll lim = (l - f - n + 1);
      |        ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...