# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23017 | 2017-05-01T20:32:06 Z | arman_ferdous | Gap (APIO16_gap) | C++14 | 0 ms | 0 KB |
long long findGap(int T, int N) { long long aray[N], i = 0, j = N-1, lo = 0, hi = MAXN; while(j-i >= 1) { long long x, y; MinMax(lo,hi,&x,&y); aray[i] = x, aray[j] = y; i++, j--; } long long res = -1; for(int i = 0; i+1 < N; i++) res = (res < aray[i+1]-aray[i] ? aray[i+1]-aray[i] : res); return res; }