
离散化
qianyri
这个作者很懒,什么都没留下…
展开
-
POJ2299 Ultra-QuickSort 树状数组(求逆序数)+离散化
POJ2299 Ultra-QuickSort #include <stdio.h> #include <string.h> #include <algorithm> #define lowbit(x) x&-x//位操作 using namespace std; const int MAX=5*1e5+5; int aa[MAX],c[MAX],n...原创 2018-04-30 18:21:01 · 282 阅读 · 0 评论 -
codeforce1042 D. Petya and Array 树状数组
codeforce1042 D. Petya and Array 相同题型,不过逆序数不用前缀和POJ2299 Ultra-QuickSort 树状数组(求逆序数)+离散化 求区间和小于T的段数 假设的前缀和为,对于每个查询,答案为 准题解:权值线段树(区间第k大)?? #include<bits/stdc++.h> using namespace std; const i...原创 2018-09-17 23:11:44 · 737 阅读 · 0 评论