![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
L_Aster
..
展开
-
1010. Lehmer Code (35)(树状数组求逆序数)
1010. Lehmer Code (35)考察点:树状数组求逆序数其离散化过程如下624 35 12 01 56 23 1 2 3 4 5 6 4 3 6 1 2 5*4 5 2 1 6 3*3 3 1 0 1 0#include <bits/stdc++.h> using namespace std; const int sz=100000+...原创 2018-04-06 14:35:59 · 203 阅读 · 0 评论 -
1009. Triple Inversions (35)(树状数组求逆序数)
1009. Triple Inversions (35)和1010一样,考察树状数组求逆序数,注意int可能溢出,用long long (2,3测试点)#include <bits/stdc++.h> using namespace std; const int sz=100000+1024; int c[sz],a[sz],n; int ltb[sz],rts[sz]; void a...原创 2018-04-06 15:02:06 · 313 阅读 · 0 评论