Count the index pairs i < j where arr[i] is at least twice arr[j] — an inversion count with a twist. Too many requests from your network. Please wait a minute.