# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
589357 | Lucpp | Connecting Supertrees (IOI20_supertrees) | C++17 | 211 ms | 27372 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;
#define sz(x) ((int)(x).size())
vector<vector<int>> g;
vector<vector<bool>> adj;
vector<vector<int>> groups;
bool findGroups(){
vector<bool> vis(sz(g));
for(int u = 0; u < sz(g); u++){
if(vis[u]) continue;
vis[u] = true;
groups.push_back({u});
for(int v : g[u]){
vis[v] = true;
groups.back().push_back(v);
if(adj[u] != adj[v]) return false;
}
}
return true;
}
int construct(vector<vector<int>> p) {
int n = sz(p);
g.resize(n);
adj.resize(n, vector<bool>(n));
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... |