Checkpoint — Coin Corridors at Scale
Challenge on lesson: Checkpoint — Collapse, Then Walk
CHALLENGE
Difficulty: advanced+25 XP
**Bài toán.** Same as the practice problem: one-way corridors, per-room coins, cycles allowed; maximize coins along one route from any start. **Constraints:** 1 ≤ n ≤ 200000; 1 ≤ m ≤ 300000; 0 ≤ coin ≤ 10^9. **Output:** one integer. A DAG-assuming DP will produce wrong (inflated) answers on cyclic inputs; the cycles must be collapsed first.
Press Submit to check your solution.
Back to lesson: Checkpoint — Collapse, Then Walk