제출 #256851

#제출 시각아이디문제언어결과실행 시간메모리
256851GoolakhGap (APIO16_gap)C++17
컴파일 에러
0 ms0 KiB
// FUCKED UP FUCKED UP FUCKED UP FUCKED UP FUCKED UP #include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O2,no-stack-protector,unroll-loops,fast-math") #define F first #define S second #define pb push_back #define SZ(x) (ll)(x.size()) #define all(x) x.begin(),x.end() #define MP make_pair typedef long long ll; typedef long double ld; typedef pair<ll,ll> pll; //mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); const ll maxn=1e5+10, maxm=5e4+10, lg=21, mod=998244353, inf=1e18; const ll MN=0,MX=inf; ll ret=MN,a[maxn]; ll findGap(ll T,ll n){ if(T==1){ ll L=MN,R=MX,k=0; for(int i=n;i>0;i-=2){ MinMax(L,R,&a[k],&a[n-1-k]); L=a[k]+1, R=a[n-1-k]-1; k++; } for(int i=1;i<n;i++) ret=max(ret,a[i]-a[i-1]); } else{ ll lf,ri,gap; MinMax(MN,MX,&lf,&ri); gap=ret=(ri-lf+n-2)/(n- 1); ll pr=-1; for(ll i=lf;i<=ri;i+=gap+1){ ll t1,t2; MinMax(i,min(i+gap,ri),&t1,&t2); if(t1!=-1){ if(pr!=-1) ret=max(ret,t1-pr); pr=t2; } } } return ret; } /* int main(){ ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); return 0; } */

컴파일 시 표준 에러 (stderr) 메시지

gap.cpp: In function 'll findGap(ll, ll)':
gap.cpp:30:4: error: 'MinMax' was not declared in this scope
    MinMax(L,R,&a[k],&a[n-1-k]);
    ^~~~~~
gap.cpp:30:4: note: suggested alternative: 'rindex'
    MinMax(L,R,&a[k],&a[n-1-k]);
    ^~~~~~
    rindex
gap.cpp:38:3: error: 'MinMax' was not declared in this scope
   MinMax(MN,MX,&lf,&ri);
   ^~~~~~
gap.cpp:38:3: note: suggested alternative: 'rindex'
   MinMax(MN,MX,&lf,&ri);
   ^~~~~~
   rindex