Gems and Glasses
CodeChefOpen on judge ↗
Vikas and Twinkle are the organizers of Eureka, a paper presentation competition. After an exhausting session of work, the evening before the competition, Twinkle challenged Vikas to a game. There are N glasses, numbered from 1 to N. They are empty at the beginning. There will be M rounds of the game. In each round, he is given two numbers L and R, and he has to put gems in all the glasses numbere
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