Rare
0/11
BCCs and 2CCs
Author: Benjamin Qi
Resources | ||||
---|---|---|---|---|
CF | ||||
CP2 |
2-Edge-Connected Components
Status | Source | Problem Name | Difficulty | Tags | |
---|---|---|---|---|---|
YS | Easy | Show Tags2CC |
C++
#include <bits/stdc++.h>using namespace std;const int MAX_N = 3e5;int timer; // Time of entry in nodeint scc; // Number of strongly connected componentsint id[MAX_N];int low[MAX_N]; // Lowest ID in node's subtree in DFS treevector<int> neighbors[MAX_N];
This section is not complete.
Any help would be appreciated! Just submit a Pull Request on Github.
(implementation)
With DSU
Status | Source | Problem Name | Difficulty | Tags | |
---|---|---|---|---|---|
Plat | Normal | Show TagsMerging |
The analysis for the above problem mentions an solution. Although this is not a two-connected component problem, we can in fact use DSU to generate two-connected components.
This section is not complete.
Any help would be appreciated! Just submit a Pull Request on Github.
(explanation?)
The DSU operations take rather than because the DSU does not use union by size, but it's easy to change this.
struct TwoEdgeCC {struct {vi e;void init(int n) { e = vi(n, -1); }int get(int x) { return e[x] < 0 ? x : e[x] = get(e[x]); }bool unite(int x, int y) { // set par[y] = xx = get(x), y = get(y);if (x == y) return 0;e[x] += e[y];e[y] = x;
Problems
Status | Source | Problem Name | Difficulty | Tags | |
---|---|---|---|---|---|
CEOI | Easy | Show TagsBCC |
- SRM 787 1000
Biconnected Components
Status | Source | Problem Name | Difficulty | Tags | |
---|---|---|---|---|---|
CSES | Normal | Show TagsBCC |
note that BCCs contain EDGES not VERTICES
Related topics include
- Articulation Points
- Bridges
- Block-Cut Tree
Tutorial
Resources | ||||
---|---|---|---|---|
GFG | maybe not completely correct |
(implementation)
Problems
Status | Source | Problem Name | Difficulty | Tags | |
---|---|---|---|---|---|
CSES | Easy | Show TagsBCC | |||
POI | Normal | Show TagsBCC | |||
APIO | Normal | Show TagsBCC | |||
POI | Normal | Show TagsBCC | |||
DMOJ | Hard | Show TagsBCC | |||
CEOI | Hard | Show TagsBCC | |||
Plat | Very Hard | Show TagsBCC |
Module Progress:
Join the USACO Forum!
Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!