(25 points) Various organizations rank universities worldwide every year. These
rankings are often controversial and do not always agree with each other. Alice
wants to find out the level of (in)consistency between the QS ranking and the US
News ranking. Consider n universities. For each university 1 ≤ i ≤n, qi and ui
are its ranks accoording to QS and US News respectively. (Hence, 91, 92, ..., 9n and
U1, U2,...Un are two permutations of 1 to n.) We call a pair of universities i, ja
"disagreement" if qi > qj and u finding the number of "disagreements" between the QS and US News rankings. Your
algorithm shall have running time strictly faster than O(n²); to get full credit, your
algorithm shall have running time O(n log n).