Problem 2876 · Hard

Count Visited Nodes in a Directed Graph

Each node has one outgoing edge, so a walk either ends in a cycle or reaches an answered node; a cycle fixes its members and the path leading into it adds one per step.

Open the interactive visualisation