# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
721939 | danikoynov | Connecting Supertrees (IOI20_supertrees) | C++14 | 225 ms | 31952 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;
const int maxn = 1010;
vector < int > graph[maxn], comp;
int cap[maxn][maxn];
int used[maxn];
vector<std::vector<int>> answer;
void dfs(int v)
{
comp.push_back(v);
used[v] = 1;
for (int u : graph[v])
{
if (!used[u])
dfs(u);
}
}
bool solve_component()
{
for (int i = 0; i < comp.size(); i ++)
for (int j = 0; j < comp.size(); j ++)
if (cap[comp[i]][comp[j]] == 0)
return false;
if (comp.size() != 1)
{
if (cap[comp[0]][comp[1]] == 2)
Compilation message (stderr)
# | 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... |