← All problemsSign in

Chef and Bulb Invention

CodeChefRating 1607Open on judge ↗

Chef is trying to invent the light bulb that can run at room temperature without electricity. So he has $N$ gases numbered from $0$ to $N - 1$ that he can use and he doesn't know which one of the $N$ gases will work but we do know it. Now Chef has worked on multiple search algorithms to optimize search. For this project, he uses a modulo-based search algorithm that he invented himself. So first h

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