Why it is not giving proper output for this question?

Why it is not giving proper output for this question?
https://codeforces.com/problemset/problem/276/A

code seems to be of some another problem please provide correct link for the problem in the next doubt.

Sorry, The Question is this One. Please telll about this one.
https://codeforces.com/problemset/problem/456/A

you need to perform sorting in this question
Code

Why sorting Sir, Then it will not gonna work because It will change the days so I think it will not gonna work.

please look at the code provided it is AC code.

AC Code Means and Can You Please tell me the logic of Sorting, Why you have done sorting in this one.

AC means accepted code, and sorting is performed because according to alex if cost was in sorted order quality wouldnt be. so to check that claim we need to sort.

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.