# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1130244 | Hamed_Ghaffari | Bridges (APIO19_bridges) | C++20 | 3094 ms | 57764 KiB |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,sse4,sse4.2,lzcnt,popcnt")
using pii = pair<int, int>;
#define pb push_back
#define all(x) x.begin(), x.end()
const int MXN = 5e4;
const int MXM = 1e5;
const int sq = 323;
int n;
struct DSU {
int par[MXN], sz[MXN];
int Find(int v) {
return v==par[v] ? v : par[v]=Find(par[v]);
}
inline void Union(int u, int v) {
if((u=Find(u))==(v=Find(v))) return;
if(sz[u]<sz[v]) swap(u,v);
sz[par[v]=u] += sz[v];
}
} dsu, dsu_tmp;
int m, q, U[MXM], V[MXM], W[MXM], W_tmp[MXM], ord[MXM], ans[MXM];
bool in_block[MXM];
# | 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... |