Submission #409679

#TimeUsernameProblemLanguageResultExecution timeMemory
409679naranbatGap (APIO16_gap)C++17
0 / 100
36 ms1864 KiB
#include "gap.h" #include<bits/stdc++.h> const long long INF = 1e18 + 6; using namespace std; long long a[100005]; long long findGap(int T, int N) { if(T == 1){ int l = 0; int r = N - 1; long long mn = 0, mx = 1e18; long long h,h1; long long a[N] = {0}; while(l <= r){ MinMax(mn, mx, &h, &h1); a[l] = h; a[r] = h1; l++; r--; } long long ans = 0; for(int i = 1; i < N; i++){ ans = max(ans,a[i] - a[i - 1]); } return ans; } else{ return 7; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...