Problem gap
User yc
Submission Time 2026-05-04 07:56:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gap.cpp: In function ‘long long int findGap(int, int)’:
gap.cpp:49:20: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
49 | if (p!=-1) ans = max(ans,*it-p);
| ^~~
| abs