# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1172933 | fryingduc | Bridges (APIO19_bridges) | C++20 | 2597 ms | 4776 KiB |
#include "bits/stdc++.h"
using namespace std;
#ifdef duc_debug
#include "bits/debug.h"
#else
#define debug(...)
#endif
const int maxn = 5e4 + 4;
const int M = 1e5 + 5;
const int B = 450;
int n, m, q;
int eu[M], ev[M], ew[M];
int qo[M], qu[M], qv[M];
bool mark[M];
int lab[maxn];
stack<pair<int, int>> stk;
int lt[M];
int res[M];
int find(int u) {
return lab[u] < 0 ? u : find(lab[u]);
}
void join(int u, int v, bool rb) {
u = find(u), v = find(v);
if (u == v) return;
# | 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... |