whats the mistake?
code:https://ide.codingblocks.com/s/238216
Fractional knapsack
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