Find the culprit!
CodeChefOpen on judge ↗
The kingdom of Codesia is ruled by king Coder. Coder has a special team of n ministers, who implement the crucial tasks ordered by the king. Each minister is identified by a number from 1 to n. The chief of the ministers is always numbered 1. There is a peculiar order in which the ministers perform tasks. If minister i likes minister j, then i follows the order by j. Except the chief, every minist
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