A King
CodeChefOpen on judge ↗
All submissions for this problem are available. Raj wants to be the King of seven kingdoms. For this to happen, he needs to address the soldiers in his army. There are n soldiers in his army (numbered 1 through n ).Raj passes on the message to the first soldier (soldier 1). This message needs to reach every soldier in the army. For this, the soldiers communicate among themselves by one soldier
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