제출 #1075775

#제출 시각아이디문제언어결과실행 시간메모리
1075775alexddGap (APIO16_gap)C++17
컴파일 에러
0 ms0 KiB
#include "gap.h" #include<bits/stdc++.h> using namespace std; #define int long long const int INF = 1e18; pair<int,int> qry(int le, int ri) { pair<int,int> aux; MinMax(le,ri,&aux.first,&aux.second); return aux; } long long findGap(int32_t T, int32_t N) { if(n<=10) return 1; int rez=1; pair<int,int> tot = qry(0,INF); int cur=tot.first; while(cur+rez+1 < tot.second) { pair<int,int> aux = qry(cur+1,cur+rez); if(aux.first!=-1) { cur = aux.second; continue; } int c=rez; while(1) { c=c*2; aux = qry(cur+1,cur+c); if(aux.first!=-1) { rez = max(rez, aux.first - cur); cur = aux.second; break; } } } return rez; }

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

gap.cpp: In function 'long long int findGap(int32_t, int32_t)':
gap.cpp:14:8: error: 'n' was not declared in this scope
   14 |     if(n<=10)
      |        ^