← All problemsSign in

Truth Teller And Liars 101

CodeChefRating 1097Open on judge ↗

You are a traveler and you are at a junction of $2$ paths - one leads to eternal happiness, the other to certain doom. There are a total of $N + M$ people, $N$ of which always tell the truth, while the remaining $M$ may tell the truth or lie. All of them are aware of which path leads to where. You don't know who is a truth teller and who is not. You will ask some randomly chosen $X$ people the f

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