# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
826954 | erray | Connecting Supertrees (IOI20_supertrees) | C++17 | 156 ms | 24036 KiB |
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 <vector>
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "/home/eagle/ioi19/day2/debug.h"
#else
#define debug(...) void(37)
#endif
int construct(std::vector<std::vector<int>> P) {
int N = int(P.size());
vector<vector<int>> ans(N, vector<int>(N));
auto Add = [&](int x, int y) {
ans[x][y] = ans[y][x] = true;
};
bool bad = false;
auto Group = [&](vector<int> s, function<bool(int)> connected) {
int c = int(s.size());
vector<bool> used(c);
vector<vector<int>> gs;
for (int i = 0; i < c; ++i) {
if (used[i]) {
continue;
}
gs.push_back({s[i]});
for (int j = i + 1; j < c; ++j) {
if (connected(P[s[i]][s[j]])) {
# | 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... |