树状数组
文章平均质量分 61
z8853797
这个作者很懒,什么都没留下…
展开
-
hoj 1687 经理的烦恼
树状数组manx = 100W 一直RE 开大原创 2014-07-18 23:43:05 · 506 阅读 · 0 评论 -
hdu 4911 Inversion
对一个数列进行K次 移动 求最后的逆序对有多少,其实就是求k次操作后最少原创 2014-08-05 21:19:25 · 388 阅读 · 0 评论 -
hdu1394 Minimum Inversion Number
按题意模拟一下先把逆序数求出来。原创 2014-07-25 20:30:00 · 411 阅读 · 0 评论 -
POJ2985 The k-th Largest Group
并查集 + 树状数组求第k #include #include #include using namespace std;int const MAXN = 200010;int n,m;int c[MAXN],father[MAXN],cnt[MAXN];void Init(){ for(int i = 1;i father[i] = i;原创 2014-07-23 16:21:37 · 593 阅读 · 0 评论 -
poj 3067
逆序数 树状数组#include #include #include #include using namespace std;typedef __int64 ll;int const MAXN = 1010;int c[MAXN * 2];struct City{ int e,w;}city[MAXN * 1000];bool cmp(City a,City原创 2014-07-23 14:10:18 · 411 阅读 · 0 评论 -
poj2155 Matrix
武森《浅谈信息学竞赛中的“0”和“1”》原创 2014-07-23 14:10:42 · 408 阅读 · 0 评论 -
POJ 2481 Cows
e 降序 e 相等的时候s升序所以原创 2014-07-20 15:34:50 · 397 阅读 · 0 评论 -
hdu 1556 Color the ball
向上统计,向下修改原创 2014-07-19 01:12:55 · 571 阅读 · 0 评论 -
Ultra-QuickSort
离散化+ 逆序数 用树状数组。知道怎么求原创 2014-07-19 16:18:02 · 473 阅读 · 0 评论 -
Mobile phones
二维树状数组 注意求区间和 要分成多个部分来加减原创 2014-07-19 15:14:19 · 522 阅读 · 0 评论 -
hdu 1166 敌兵布阵
树状数组或线段树都可以原创 2014-07-18 21:26:19 · 439 阅读 · 0 评论