https://www.codechef.com/UICC2019/problems/RUSH03
How to approach this problem??
Question link - https://www.codechef.com/UICC2019/problems/RUSH03
Hi Lakshay, This is a easy problem.
You need to find k values out of n whose sum will give S.
Here, N<=20 So you can use BruteForce.
Firstly Find all subsets of size K from N values and check if any one will give sum S , If yes then Print those K values.
Just find All subset Using Recursion.
Hit like if u get it
If u got stuck in code then reply here.
1 Like