답안 #857394

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
857394 2023-10-06T06:20:51 Z mychecksedad 참나무 (IOI23_beechtree) C++17
컴파일 오류
0 ms 0 KB
#include <beechtreee.h>
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(x) x.begin(), x.end()
const int N = 2e5+100;


vector<array<int, 2>> g[N];
vector<int> ans;


vector<int> beechtree(int n, int m, vector<int> P, vector<int> C){
	for(int i = 1; i < n; ++i){
		g[P[i]].pb({i, C[i]});
	}
	ans.resize(n);

	bool ok = 1;
	for(int i = n - 1; i >= 0; --i){
		if(!ok) ans[i] = 0;
		else{
			if(i < n - 1 && C[i] != C[i + 1]) ok = 0, ans[i] = 0;
			else ans[i] = 1;
		}
	}

	return ans;
}	

Compilation message

beechtree.cpp:1:10: fatal error: beechtreee.h: No such file or directory
    1 | #include <beechtreee.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.