INVERSION_COUNT

Sir the inversion count question is present on SPOJ and on coding blocks , on SPOJ it is accpeted but on coding blocks it is showing WA. Can u pls tell what is wrong in my code.
Code Link:- https://ide.codingblocks.com/s/631489