Help ramu in min cost

Can u pls explain me about input format and sample input . EXPLAIN IN AN EASY WAY AND IN FULL DETAIL.

hey @Nikhil-Aggarwal-2320066674901389, Consider the following explanation.
n= number of Rickshaws m=number of cabs
there are 4 tickets that ramu can purchase of cost c1,c2,c3 and c4
ticket 1 costs c1 ruppees,using which ramu can get 1 ride on 1 rickshaw or get 1 ride on 1 cab.
ticket 2 costs c2 ruppees,using which ramu can get infinite number of rides on 1 rickshaw or infinite number of rides on 1 cab.
ticket 3 costs c3 ruppees,using which ramu can get infinite number of rides on all n rickshaws or infinite number of rides on all m cabs.
ticket 4 costs c4 ruppees,using which ramu can get infinite number of rides on all n rickshaws as well as on all m cabs.

Ramu knew no. of cabs and no. of rickshaw available. He also knew no. of rides he will take in each cab or riskshaw.
For example if no. of Rickshaw are 2, ramu knew how many ride he will take with Riskshaw1 and Rickshaw 2.
Similar for cabs

now come to test cases.
2 //no of testcases=2
//testcase1 start
1 3 7 19 // they are costs C1,C2,C3,C4
2 3 //no of rickshaw=2 no of cabs=3
2 5 //no of ride ramu will take in Rickshaw 1= 2 no of ride ramu will take in Rickshaw 2=5
4 4 4 //no of ride ramu will take in cab1= 4…no of ride in Cab 2=4…no of rides in cab 3= 4
//testcase1 ends
//testcase2 starts
4 3 2 1
1 3
798
1 2 3
//tetscase 2 ends

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.