2 Segments
CodeChefOpen on judge ↗
There are 2 integer segments, the first segment contains number 1, and the second segment contains number 0. In a move, one can perform the operations such that if in the first segment there is a number 'a' and in the second segment there is a number 'b' then the second segment becomes 'b+1'. Or if in the first segment there is a number 'a' and in the second segment there is a number 'b' then the
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