# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1061869 | ArthuroWich | Connecting Supertrees (IOI20_supertrees) | C++17 | 127 ms | 27940 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<bits/stdc++.h>
using namespace std;
vector<vector<int>> adj;
int n, vis[1005], used[1005], co = 0;
void dfs(int i) {
if (vis[i] > 0) {
return;
}
vis[i] = co;
for (int j = 0; j < n; j++) {
if (i == j || adj[i][j] == 0) {
continue;
}
dfs(j);
}
}
int construct(vector<vector<int>> p) {
n = p.size();
adj = p;
vector<vector<int>> ans(n, vector<int>(n, 0));
for (int i = 0; i < n; i++) {
if (vis[i] > 0) {
continue;
}
co++;
dfs(i);
}
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; 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... |