I did not understand what question is asking and SAMPLE INPUT

i did not understand what question is asking and SAMPLE INPUT

Hi Nipun,In this question you have to take input of numbers as long as the sum of numbers become negative and print those numbers which are giving the positive sum.

1 3 7 19-this are values of c1,c2,c3 and c4
2 3-this line tells us that he will use 2 rickshaws and 3 cabs
2 5-this line tells the number of times ramu is going to use of rickshaw0 and rickshaw 1 respectively
4 4 4-this line tells the number of times ramu is going to use of cab0, cab1 and cab2 respectively
Dry run for the given input:
So for riding rick0 one way is that he purchase ticket c1 twice so total cost will be 2 there is one more way that he can chose ticket c2 but as c2 costs rs 3 so he will select option 1 where he has to pay 2 rs.
Now for rick1 by first option he has to pay 5*1 rs and second option is that he can purchase ticket c2 that costs 3 rs so he will purchase ticket c2(as 3 is less than 5)…now compare 5 rs with cost of c3 as 5 rs is less than 7 so we will select to pay 5 rs.
So total cost of riding the rickshaws is 5 rs
Now do the same thing for cabs…and suppose total cost of riding cabs is say ‘x’…then total rides will cost x+5…compare this value with c4…return their min as your ans…

Hi Nipun
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.