Problem: you are given a directed graph where each node contains some coins. You can start at any node, then follow directed edges to visit other nodes and collect their coins. Find the maximum total coins you can collect on any path in the graph. Here is the core concept: If there is a cycle, you can collect all coins in that cycle.
Compress all SCCs into single nodes, then find the longest path in the resulting DAG.