제출 #782531

#제출 시각아이디문제언어결과실행 시간메모리
782531boyliguanhan통행료 (IOI18_highway)C++17
컴파일 에러
0 ms0 KiB
#include "doll.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> X, Y;
int N, s_state[200100];
 
int CALCTREE(int l, int r) {
	if(l >= N) return -1;
	if(r - 1 > l) {
		int mid = l+r>>1;
        X.push_back(0), Y.push_back(0);
        int pos = X.size()-1;
		Y[pos]=(CALCTREE(l, mid));
		X[pos]=(CALCTREE(mid, r));
		return -pos-1;
	}
	return 1;
}
 
void create_circuit(int M, vector<int> A) {
	vector<int> C(M+1,-1);
	A.push_back(0);
	N = A.size();
    int x = 1;
	while(x<N)
        x *= 2;
	CALCTREE(0, x);
	for(int &i : A) {
		int cur_switch = 0;
		while(cur_switch >= 0) {
			s_state[cur_switch] ^= 1;
			int &w = s_state[cur_switch] ? X[cur_switch] : Y[cur_switch];
			if(w >= 0)
                w = i, cur_switch = -1;
			else
                cur_switch = -1-w;
		}
	}
	answer(C, X, Y);
}

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

highway.cpp:1:10: fatal error: doll.h: No such file or directory
    1 | #include "doll.h"
      |          ^~~~~~~~
compilation terminated.