Submission #23017

#TimeUsernameProblemLanguageResultExecution timeMemory
23017arman_ferdousGap (APIO16_gap)C++14
Compilation error
0 ms0 KiB
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; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:3:53: error: 'MAXN' was not declared in this scope
     long long aray[N], i = 0, j = N-1, lo = 0, hi = MAXN;
                                                     ^
gap.cpp:7:27: error: 'MinMax' was not declared in this scope
         MinMax(lo,hi,&x,&y);
                           ^