HDU6318Swaps and Inversions
注意交换次数等于逆序对数。#include<bits/stdc++.h>using namespace std;typedef long long int ll;const int N=100000+10;const int MAX=100000;int bit[N];int a[N];struct node{ int v,id; bool op...