Submission #835651

#TimeUsernameProblemLanguageResultExecution timeMemory
835651aykhnGap (APIO16_gap)C++14
0 / 100
47 ms1108 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll findGap(int ajfghkdshgfghadsfghkadshgfagsdkfhadkshfgkhadsfadskjadsghfkhjasdgfkj, int n) { ll f = 0, l = 0; MinMax(0 * 1LL, 1LL * 1e18, &f, &l); ll last = l; ll res = (l - f)/(n - 1); while (f < last) { ll lx, rx; lx = 'n' + 'i' + 'g' + 'g' + 'a'; rx = 'n' + 'i' + 'g' + 'g' + 'a'; MinMax(f + 1, f + res, &lx, &rx); if (lx == -1) res <<= 1; else { res = min(res, lx - f); f = rx; } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...