# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1150263 | abczz | Bridges (APIO19_bridges) | C++20 | 2251 ms | 589824 KiB |
#include <iostream>
#include <array>
#include <algorithm>
#include <cmath>
#define ll int
using namespace std;
array<ll, 3> A[100005];
vector <array<ll, 4>> Q;
vector <ll> U[100005];
ll n, m, q, a, b, c, t, rtq, P[100005], F[100005];
struct DSU{
vector <ll> G, gsz;
vector <array<ll, 4>> T;
void init(ll sz) {
G.resize(sz);
gsz.resize(sz);
for (int i=0; i<sz; ++i) G[i] = i, gsz[i] = 1;
}
ll dsu(ll u) {
if (G[u] == u) return u;
else return dsu(G[u]);
}
ll query(ll u) {
return gsz[dsu(u)];
}
void merge(ll a, ll b) {
ll u = dsu(a);
ll v = dsu(b);
# | 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... |