The Walking Dead
CodeChefOpen on judge ↗
The Zombies are attacking everyone. There are $N$ places numbered from $0$ to $N-1$. Place $0$ is the one and only safe zone here. There are certain zombie-infested places, from where you may never return. Once a person reaches the safe zone, they stay there. Each place (excluding the safe zone and dead zone) has one person in it. Each place is such that there is a fixed probability of where
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start