Submission #712687

#TimeUsernameProblemLanguageResultExecution timeMemory
712687tht2005Gap (APIO16_gap)C++17
30 / 100
49 ms1880 KiB
#include "gap.h" #include <vector> #include <algorithm> long long a[(int)1e5 + 5]; long long findGap(int T, int N) { MinMax(0, 1LL << 60, a, a + N - 1); for(int l = 1, r = N - 2; l <= r; ++l, --r) { MinMax(a[l - 1] + 1, a[r + 1] - 1, a + l, a + r); } long long res = 0; for(int i = 0; i + 1 < N; ++i) { res = std::max(res, a[i + 1] - a[i]); } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...