# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1164037 | HappyCapybara | Parachute rings (IOI12_rings) | C++20 | 514 ms | 109796 KiB |
#include<bits/stdc++.h>
using namespace std;
vector<int> p;
bool ol = false;
int n, nc;
vector<int> deg;
unordered_set<int> s, cycle;
vector<vector<int>> g;
int ufind(int a){
if (a == p[a]) return p[a];
return p[a] = ufind(p[a]);
}
void merge(int a, int b){
a = ufind(a);
b = ufind(b);
if (a == b) return;
p[b] = a;
}
void path(int a, int b){
vector<int> par(n, -1);
par[a] = a;
queue<int> q;
q.push(a);
while (!q.empty()){
int cur = q.front();
q.pop();
# | 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... |