Submission #304760

#TimeUsernameProblemLanguageResultExecution timeMemory
304760rocks03Gap (APIO16_gap)C++14
30 / 100
57 ms1964 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 = LLONG_MAX; 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...