Wrong Answer In BUY AND SELL

One Wrong Answer in Buy and Sell
Ques Link:
https://hack.codingblocks.com/contests/c/586/965

My Code:
https://ide.codingblocks.com/s/50626 1

I have updated the BIT , such that it counts number of elements/stock items greater than that price/index !

Hey Shubham, your code is not working for larger numbers (when the numbers are in range of 10^5). So just handle it for larger inputs.

I have tried increasing array size or converting int to long long int , still one WA…

Hey Shubham, can you share the link of your updated code here.

Link to my updated code : https://ide.codingblocks.com/s/54750
In constraints of this question max limit 100000 is given , And it is working fine for that…