# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1133383 | Kubeti | Pipes (CEOI15_pipes) | C++20 | 587 ms | 17768 KiB |
#include <bits/stdc++.h>
using namespace std;
const int nmax = 1e5 + 1, mod = 1e6 + 7;
struct DSU {
int root[nmax], sz[nmax];
void init(int n) {
for(int i = 1; i <= n; i++) {
root[i] = i;
sz[i] = 1;
}
}
int find(int a) {
if(root[a] == a) {
return a;
}
return root[a] = find(root[a]);
}
void unite(int a, int b) {
assert(a != b);
if(sz[a] > sz[b]) {
swap(a, b);
}
root[a] = b;
sz[b] += sz[a];
# | 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... |
# | 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... |