답안 #158846

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
158846 2019-10-19T06:01:32 Z username Minerals (JOI19_minerals) C++14
컴파일 오류
0 ms 0 KB
#include "minerals.cpp"
#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#define REP(i,j,k) for(int i=(j);i<(k);++i)
#define pb push_back
// #define __debug
#ifdef __debug
	#define pr(...) cerr<<__VA_ARGS__
	#define ar(a,s,t) {rep(zy,s,t)pr(a[zy]<<' ');pr(endl);}
#else
	#define pr(...) (void)0
	#define ar(...) (void)0
#endif
//
int ls=0,ll=0;
vector<int>v[2];

int qr(int x){
	int t=Query(x+1);
	swap(t,ls);
	return ls==t;
}

void sol(int l,int r,vector<int>&vec){
	if(l+1==r)Answer(v[0][l]+1,vec[0]+1);
	else{
		int mid=(2*l+r+1)/3;
		vector<int>vv[2];
		if(l>ll)REP(i,l,mid)qr(v[0][i]);
		else REP(i,mid,r)qr(v[0][i]);
		ll=l;
		REP(i,0,vec.size()){
			int t=vec[i];
			vv[qr(t)].pb(t);
		}
		sol(l,mid,vv[1]);
		sol(mid,r,vv[0]);
	}
	vector<int>().swap(vec);
}

void Solve(int n){
	REP(i,0,2*n)v[qr(i)].pb(i);
	sol(0,n,v[1]);
}

Compilation message

minerals.cpp:1:10: fatal error: minerals.cpp: No such file or directory
 #include "minerals.cpp"
          ^~~~~~~~~~~~~~
compilation terminated.