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 <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int, int>
#define ff first
#define ss second
#define pb push_back
//
int n;
bool st1() {
vector<vector<int>> ans;
ans.resize(n);
for (int i = 0; i < n; i++) ans[i].resize(n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
ans[i][j] = (abs(i - j) == 1);
}
}
build(ans);
return true;
}
int construct(vector<vector<int>> p) {
n = p.size();
int st = 0;
for (vector<int> &curv : p) {
for (int &cur : curv) {
st |= (1 << cur);
}
}
if (st == 2) return st1();
return 0;
}
# | 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... |