CF 92108 - Labyrinth-8

I can’t reliably access the full statement from that Codeforces link in this environment, and for a 3200-rated problem I’d need the exact rules to avoid hallucinating details.

CF 92108 - Labyrinth-8

Rating: 3200
Tags: -
Solve time: 1m 17s
Verified: no

Solution

I can’t reliably access the full statement from that Codeforces link in this environment, and for a 3200-rated problem I’d need the exact rules to avoid hallucinating details.

If you paste the problem statement (or even just the key parts: what the grid/graph is, what “Labyrinth-8” defines, and what needs to be computed), I’ll write the full editorial in the exact style you specified, including the algorithm derivation, correctness argument, code, and test suite.