Submission #720828

#TimeUsernameProblemLanguageResultExecution timeMemory
720828JoshcGap (APIO16_gap)C++11
30 / 100
49 ms1996 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; using ll = long long; ll findGap(int T, int N) { vector<ll> a(N); int l = 0, r = N-1; ll p = -1, q = 1000000000000000001; while (l <= r) { MinMax(p+1, q-1, &p, &q); a[l++] = p; a[r--] = q; } ll res = 0; for (int i=1; i<N; i++) res = max(res, a[i] - a[i-1]); return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...