CF - C1 and C2 (Potions)

Problem Link - Problem - C1 - Codeforces
Problem Link - Problem - C2 - Codeforces
getting wrong answer of test case 3 which is very big

My solution - Submission #117773308 - Codeforces

Please help.

Since you have use sort, therefore it is wrong.
Order matters.

1 Like