제출 #1256158

#제출 시각아이디문제언어결과실행 시간메모리
1256158MasterDebaterA Difficult(y) Choice (BOI21_books)C++20
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int binary_search(int lo,int hi,ll a){
	int res=0;
	while(lo<=hi){
		int mid=(lo+hi)/2;
		if(skim(mid)<=a)res=mid,lo=mid+1;
		else hi=mid-1;
	}
	return res;
}
void solve(int N,int K,ll A,int S){
	int L=binary_search(1,N,A-1);
	int R=binary_search(1,N,2*A);
	if(R-L>=K){
		vector<int>ans;
		for(int i=L+1;i<=L+K;i++)ans.push_back(i);
		answer(ans);
	}
	impossible();
	return;
}

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

books.cpp: In function 'int binary_search(int, int, long long int)':
books.cpp:8:20: error: 'skim' was not declared in this scope
    8 |                 if(skim(mid)<=a)res=mid,lo=mid+1;
      |                    ^~~~
books.cpp: In function 'void solve(int, int, long long int, int)':
books.cpp:19:17: error: 'answer' was not declared in this scope
   19 |                 answer(ans);
      |                 ^~~~~~
books.cpp:21:9: error: 'impossible' was not declared in this scope
   21 |         impossible();
      |         ^~~~~~~~~~