← All problemsSign in

Guessing Game

CodeChefRating 2702Open on judge ↗

**This is an interactive problem. Incase you are new to interactive problems, take a look at this [link](https://discuss.codechef.com/t/interactive-problems-and-the-way-to-deal-with-them/21185).** Alice and Bob are playing a game. Initially, Alice has a hidden integer $x$; Bob only knows an integer $N$ such that $1 \le x \le N$ and he has to find $x$ by asking questions. In each question, Bob m

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