C4 (Happy dinner party) getting TLE

link to my code link:C4 solution link

link to question : Link:question

i am getting TLE, the code does recursion all i do is at an index i either select an ingredient and go to the next one or dont select and go to the next one,once i get the exact amount of protiens i stop that current recursion ans add the ingredients to a list and continue with the remaining recursions and finally sort and print the first item in the list , as this is linear i thought it will pass but i was wrong

can anybody suggest a better algo ?

//