Naive solution to NCPC 2011, Problem B: Mega Inversions. O(n^2) is too slow apparently.