Submission #782531

# Submission time Handle Problem Language Result Execution time Memory
782531 2023-07-14T04:24:42 Z boyliguanhan Highway Tolls (IOI18_highway) C++17
Compilation error
0 ms 0 KB
#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);
}

Compilation message

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