Doubt in Counting Inversions Revisited Problem Code: INVYCNT

Problem: https://www.codechef.com/LTIME77B/problems/INVYCNT
In this problem instead of storing differently for the left and right part of the array, I count the total number of elements greater than current and summed it up with ans. For the left part of the sequence which should not be counted in the ans I am simply subtracting it.
PS: I ran my code with the accepted one for many test cases and I didn’t find anything wrong. I am still gettting WA.
MyCode