← All problemsSign in

Gotham PD

CodeChefRating 2346Open on judge ↗

Chef has teamed up with Batman and Jim Gordon to save Gotham from Joker's plan. There are initially N police stations each having a unique id and an encryption key. All stations are connected, using telephone lines, directly or indirectly, to Gordon's police station (the one with id R). In order to provide better protection for all people in Gotham, Batman and Chef have paid for some new police s

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start