PrevNext
Rare
 0/9

Strongly Connected Components

Authors: Benjamin Qi, Dong Liu

Subsets of nodes in directed graphs where each node in a subset can reach each other node in the subset.

SCCs

Tutorial

Resources
CPH
CPC
CP2
Benqconcise implementation of Kosaraju's Algorithm
Benqconcise implementation of Tarjan's Algorithm

Focus Problem – read through this problem before continuing!

Solution - Planets and Kingdoms

Just run Kosaraju's or Tarjan's SCC algorithm on the graph.

Then assign each component an IDID (starting from 11).

Using Kosaraju's SCC

Using Tarjan's SCC

Problems

StatusSourceProblem NameDifficultyTagsSolutionURL
CSESEasy
Show Tags

DP, SCC

POIEasy
Show Tags

SCC, dp

Show Sketch
Old GoldNormalExternal Sol
CFNormalCheck CF
POIHardExternal Sol
KattisHardView Solution
CSESHardView Solution

2-SAT

StatusSourceProblem NameDifficultyTagsSolutionURL
CSESNormalView Solution

(impl)

Tutorial

Resources
CF

(KACTL at most one?)

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!

PrevNext