답안 #92884

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
92884 2019-01-05T12:17:56 Z Pajaraja popa (BOI18_popa) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "popa.h"
#define MAXN 1007
using namespace std;
int ls[MAXN],rs[MAXN];
int rek(int lt,int rt)
{
	if(lt>rt) return -1;
	int l=lt,r=rt;
	while(l!=r)
	{
		int s=(l+r)/2;
		if(Query(lt,rt,lt,s)) r=s;
		else l=s+1;
	}
	ls[l]=rek(lt,l-1);
	rs[l]=rek(rt,l+1);
	return l;
}
int solve(int N,int* Left,int* Right)
{
	int a=rek(0,N-1);
	for(int i=0;i<N;i++) Left[i]=ls[i];
	for(int i=0;i<N;i++) Right[i]=rs[i];
	return a;
}

Compilation message

popa.cpp: In function 'int rek(int, int)':
popa.cpp:13:6: error: 'Query' was not declared in this scope
   if(Query(lt,rt,lt,s)) r=s;
      ^~~~~
popa.cpp:13:6: note: suggested alternative: 'query'
   if(Query(lt,rt,lt,s)) r=s;
      ^~~~~
      query