제출 #148050

#제출 시각아이디문제언어결과실행 시간메모리
148050GodTeCave (IOI13_cave)C++14
컴파일 에러
0 ms0 KiB
#include <cave.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;

// #define TT() printf("%.4f sec\n", (double) clock() / CLOCKS_PER_SEC )
#define Fi first
#define Se second
#define rep(i, n) for(ll i=0;i<n;i++)
#define repp(i, n) for(ll i=1;i<=n;i++)

#define INF 1987654321
#define IINF 987654321987654321


void exploreCave(int N){
	int ans[5010] = {0,};
	int cntd[5010] = {0,};
	rep(i,5010){
		ans[i] = 0; cntd[i] = -1;
	}	
	rep(i,N){
		int l = 0; int r = N-1;
		while(l < r){
			int mid = (l+r)/2;
			for(int j = l; j <= mid; j++){
				if(cntd[j] == -1) ans[j] = 1-ans[j];
			}
			if(tryCombination(ans) > i) r = mid;
			else {
				for(int j = l; j <= r; j++) if(cntd[j] == -1) ans[j] = 1-ans[j];
				l = mid+1;
			}
		}
		cntd[l] = i;
	}
	answer(ans,cntd);
}

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

cave.cpp:5:9: error: 'pair' does not name a type
 typedef pair<int, int> Pi;
         ^~~~
cave.cpp:6:9: error: 'pair' does not name a type
 typedef pair<ll, ll> Pll;
         ^~~~