Rekha lost a bet
CodeChefOpen on judge ↗
Rekha recently lost a bet to Amit. To settle the problem, they are playing a game: They have N balls in front of them. Each ball, except the 1st ball, is numbered from 0 to 9. The 1st ball is numbered from 1 to 9. Amit calculates all the subsequences of the number thus formed. Each subsequence of sequence S is represented by Sk. e.g. S = 1 2 3 S0 = 1 2 3 , S1 = 1 2 , S2 = 1 3 , S3 = 2 3 , S4 =
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