← All problemsSign in

Find the Array

You were initially given an array $A$ of size 3, You were feeling restless so you created another array $B$ which consists of all the sums of all non-empty subsequences of array $A$ in sorted order. For example if $A$={1,2,3} then $B$ = {1,2,3,1+2,1+3,2+3,1+2+3} Due to some reason you lost array $A$ can you restore array $A$ with array $B$. ### Input - Each test case consists of one line which co

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