Treasure of truth
CodeChefOpen on judge ↗
You are on a quest to find a Treasure, but on your way you found an obstacle protected by N guards. Each guard will make a statement which can be true or false.If you find out the maximum number of guards who are definitely telling the truth, the guards will open the gate. Guard number i will make a statement of the form At least Ri guards (including myself) are telling the truth At least one g
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