摘要:
对于a[],b[]两个数组,我们应选取其中一个为基准,再运用树状数组求逆序对的方法就行了。 大佬博客:https://www.cnblogs.com/luckyblock/p/11482130.html #include<bits/stdc++.h> using namespace std; typ 阅读全文
摘要:
模板题,树状数组加上离散化求逆序对。 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 const int N=5e5+10; 5 int n,a[N],b[N],c[N]; 6 LL ans; 7 阅读全文