This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include"supertrees.h"
#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
using namespace std;
#define vi vector<int>
#define vvi vector<vi>
vi L;
int construct(std::vector<std::vector<int>> p) {
int n = p.size();
vvi Adj(n, vi(n, 0));
L.clear();
for (int i = 0; i < n; i++) {
bool q = 0;
for (auto j : L) {
if (p[i][j]) {Adj[i][j] = 1; Adj[j][i] = 1; q = 1; break;}
}
if (!q) L.push_back(i);
}
build(Adj);
return 1;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |