Submission #1146140

#TimeUsernameProblemLanguageResultExecution timeMemory
1146140hoangnoobproGap (APIO16_gap)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define nmax 300007 #define fi first #define se second #define ll long long long long findGap(ll T,ll N) { ll kq=0,x=0,y=1e18,a[100007],j,k; if(T==1) { MinMax(x,y,&a[1],&a[n]); j=2; k=n-1; while(j<=k) { MinMax(a[j-1],a[k+1],&a[j],&a[k]); j++; k--; } for(int i=2;i<=n;++i)kq=max(kq,a[i]-a[i-1]); } return kq; }

Compilation message (stderr)

gap.cpp: In function 'long long int findGap(long long int, long long int)':
gap.cpp:13:29: error: 'n' was not declared in this scope
   13 |         MinMax(x,y,&a[1],&a[n]);
      |                             ^
gap.cpp:13:9: error: 'MinMax' was not declared in this scope; did you mean 'nmax'?
   13 |         MinMax(x,y,&a[1],&a[n]);
      |         ^~~~~~
      |         nmax