Submission #1027598

#TimeUsernameProblemLanguageResultExecution timeMemory
1027598stdfloatGap (APIO16_gap)C++17
0 / 100
38 ms3072 KiB
#include <bits/stdc++.h> #include "gap.h" using namespace std; using ll = long long; ll findGap(int T, int N) { ll s = 0, t = (ll)1e18, ans = LLONG_MAX; while (true) { ll x, y; MinMax(s + 1, t - 1, &x, &y); if (x == -1) return min(ans, t - s); ans = min({ans, x - s, t - y}); s = x; t = y; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...