Help Ramu - Ticket selection and sample input

In this Question we have to find minimum sum of ruppees ramu will have to spend , but when ramu takes rickshaws and when he takes cabs ?
and how do I know c1 and c2 ticket applies for which cab and rikshaw?
Please explain how the Sample Inputs are being processed?

Hii Abhinav,
Provide the link of the question.

Hi Abhinav, 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.