제출 #134514

#제출 시각아이디문제언어결과실행 시간메모리
134514thanospopa (BOI18_popa)C++14
컴파일 에러
0 ms0 KiB
#include<iostream> //#include<popa.h> using namespace std; int myway(int l,int r,int* Left,int* Right){ if(l>r) return -1; if(l==r){ Left[l]=-1; Right[l]=-1; return l; } int g=-1; for(int i=l; i<=r; i++){ if(query(l,i,i,r)==1){ Left[i]=myway(l,i-1,Left,Right); Right[i]=myway(i+1,r,Left,Right); g=i; break; } } return g; } int solve(int N,int* Left,int* Right){ int h=-1; for(int i=0; i<N; i++){ if(query(0,i,i,N-1)){ h=i; break; } } myway(0,N,Left,Right); return h; }

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

popa.cpp: In function 'int myway(int, int, int*, int*)':
popa.cpp:13:8: error: 'query' was not declared in this scope
     if(query(l,i,i,r)==1){
        ^~~~~
popa.cpp: In function 'int solve(int, int*, int*)':
popa.cpp:25:8: error: 'query' was not declared in this scope
     if(query(0,i,i,N-1)){
        ^~~~~