Fractional knapsack

whats the mistake?
code:https://ide.codingblocks.com/s/238216

ques:https://hack.codingblocks.com/app/contests/1289/328/problem


few loopholes in your code are rectified see to them.
It may pass only 1 testcase(because of some backend issue) but it’s correct as I manually checked the inputs and it shows correct answers