Submission #823070

# Submission time Handle Problem Language Result Execution time Memory
823070 2023-08-12T07:34:41 Z Sohsoh84 Comparing Plants (IOI20_plants) C++17
Compilation error
0 ms 0 KB
#include "supertrees.h"
#include <bits/stdc++.h>

using namespace std;

const int MAXN = 1e5 + 10;

int f[MAXN];

int construct(vector<vector<int>> p) {
	int n = p.size();
	vector<vector<int>> answer;
	for (int i = 0; i < n; i++) {
		vector<int> row;
		row.resize(n, 0);
		answer.push_back(row);
	}

	for (int i = 1; i < n; i++) {
		int lst = i;
		for (int j = 0; j < i; j++)
			if (p[i][j])
				if (lst == i) lst = j;

		f[i] = i;
		f[i] = f[lst];

		if (lst < i) answer[i][lst] = answer[lst][i] = 1;
	}

	for (int i = 0; i < n; i++)
		for (int j = i + 1; j < n; j++)
			if (p[i][j] ^ (f[i] == f[j]))
				return 0;

	build(answer);
	return 1;
}

Compilation message

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