# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
95587 | 2019-02-02T06:20:10 Z | rocketninja7 | Gap (APIO16_gap) | C++14 | 0 ms | 0 KB |
#include "gap.h" long long findGap(int T, int N){ long long arr[N]; for(int i=0;i<(N+1)/2;i++){ long long s=0, t=1000000000000000000, mn, mx; MinMax(s, t, *mn, *mx); s=arr[i]=mn; t=arr[N-1-i]=mx; } long long diff=0; for(int i=1;i<N;i++){ diff=max(diff, arr[i]-arr[i-1]); } return diff; }