Submission #981642

#TimeUsernameProblemLanguageResultExecution timeMemory
981642CBCodeGap (APIO16_gap)C++17
30 / 100
34 ms3864 KiB
#include "gap.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll findGap(int T, int N) { if(T) { vector<ll> a(N); int l = 0, r = N-1; ll mnn = 0, mxx = 1e18; while(l <= r) { MinMax(mnn, mxx, &a[l], &a[r]); mnn = a[l]+1; mxx = a[r]-1; l++; r--; } ll ans = 0; for(int i = 1; i < N; i++) { ans = max(ans, a[i]-a[i-1]); } return ans; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...