https://ide.codingblocks.com/s/283406giving wrong answer for all the test cases except the first test case.
can you please mark the mistake
https://ide.codingblocks.com/s/283406giving wrong answer for all the test cases except the first test case.
can you please mark the mistake
@sk3657860 small mistake corrected and commented
dont forget to hit like and mark resolved if cleared 
got it
i was using original capacity