# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
156955 | popovicirobert | Bridges (APIO19_bridges) | C++14 | 2849 ms | 21292 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 <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define lsb(x) (x & (-x))
using namespace std;
const int MAXN = 50000;
const int MAXM = (int) 1e5;
const int B = 1500;
struct DSU {
vector <int> par, sz;
int n;
inline void init(int _n) {
n = _n;
par.resize(n + 1), sz.resize(n + 1, 1);
}
int root(int x) {
if(par[x] == 0) return x;
return par[x] = root(par[x]);
}
inline void join(int x, int y) {
x = root(x), y = root(y);
if(x != y) {
par[x] = y;
sz[y] += sz[x];
# | 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... |