Submission #304762

#TimeUsernameProblemLanguageResultExecution timeMemory
304762rocks03Gap (APIO16_gap)C++14
30 / 100
59 ms2088 KiB
#include<bits/stdc++.h> #define ll long long using namespace std; void MinMax(long long s, long long t, long long *mn, long long *mx); long long findGap(int T, int N){ ll arr[N]; ll l = 0, r = 1e18; for(int i = 0, j = N-1; i <= j; i++, j--){ MinMax(l, r, &arr[i], &arr[j]); l = arr[i] + 1, r = arr[j] - 1; } ll ans = 0; for(int i = 1; i < N; i++){ ans = max(ans, arr[i] - arr[i-1]); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...