EXPEDI GREEDY SPOJ

The same solution got accepted on spoj but is not getting accepted here

@avinashmallik2017 If the solution is accepted on SPOJ, then your solution is correct. Their might be some error in the test cases, I will notify them to correct it.
If this resolves your doubt mark it as resolved.

@avinashmallik2017 If you are getting TLE, I would suggest pass the parameters in compare by reference.

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.