Submission #341771

#TimeUsernameProblemLanguageResultExecution timeMemory
341771blueGap (APIO16_gap)C++11
0 / 100
50 ms1260 KiB
#include "gap.h" using namespace std; long long findGap(int T, int N) { if(T == 1) { long long s, t; long long mn, mx; s = 0; t = 1000000000000000000LL; long long res = 0; MinMax(s, t, &mn, &mx); s = mn+1; t = mx-1; while(1) { MinMax(s, t, &mn, &mx); if(mn == -1) return res; if(s - mn > res) res = s - mn; if(mx - t > res) res = mx - t; s = mn+1; t = mx-1; } } return -1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...