BUY AND SELL problem not passing 1 test case

Sir, I tried my best to solve the problem but 1 test case out of 3 is giving wrong answer. Kindly rectify where am I doing mistake.
The code link is :- https://ide.codingblocks.com/s/100105

actually it is happening with everyone , we will rectify it soon , move on to other questions,