CodeForces 540E Infinite Inversions (线段树/逆序列/离散化)
Thereisaninfinitesequenceconsistingofallpositiveintegersintheincreasingorder:p = {1, 2, 3, …}.Weperformednswapoperationswiththissequence.Aswap(a, b)isanoperationofswappingtheelementsofthesequenceonpos