Play with Exponents
CodeChefOpen on judge ↗
Samuel has n boxes of blue balls to dispatch to his clients. Each of the boxes is numbered from 1 to n, such that the number of blue balls in each box - a(i) is such that a(1), a(2) … a(n) are sorted in non-decreasing order. In a complex encoding of his records that Samuel follows, he writes integers 2a(1), 2a(2), 2a(3) ….. 2a(n) on paper. Now in order to represent this set of boxes, he requires
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