Problem solving challenge help ramu

i am not getting the logic of the problem ,please explain it to me

hello @kabirsachin1999

Assume rickshaw is R and cabs is C
So 1st statement means
It will cost c1 rupoes to either use R or C once

2nd statement means
Unlimited rides ticket on R or C =c2 , that after paying c2 u can use either R or C unlimited times for some particular vehicle (say u paid c2 for DL …0037 so u can take multiple rides of that car)

3rd statement means
Unlimited rides ticket on R or C =c3 ,that after paying c3 u can use either R or C any vehicle unlimited times

4th statement means
U can use both R & C all vehicles

Example
If say options for R are a,b and C are x,y

Then 1) use a once or b once or x once or y once
2) use a unlimited times or b unlimited times or x unlimited times or y unlimited times
3) use both a,b unlimited times ot use both x,y unlimited times
4) use a,b,x,y unlimited times

video editorial->

1 Like

thank you bhaiya i got it,but it is giving segmentation fault in cb ide, while it is running correrctly on my local ide

1 Like

what is the reason of getting segmentation fault?

You are trying to access illegal memory or trying to allocate memory when not available
Or running ur code without custom input which leads to garbage input values

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.