Double inversions

Problem Name:
Double inversions
Site:HackerEarth
Links:
Tags:
Problem setters: