码迷,mamicode.com
首页 >  
搜索关键字:线段树    ( 9365个结果
POJ2886 Who Gets the Most Candies? 【线段树】+【单点更新】+【模拟】+【反素数】
Who Gets the Most Candies? Time Limit: 5000MS   Memory Limit: 131072K Total Submissions: 9416   Accepted: 2868 Case Time Limit: 2000MS Description N children are s...
分类:其他好文   时间:2014-07-09 12:46:35    阅读次数:234
HDU-4819-Mosaic(二维线段树)
Problem Description The God of sheep decides to pixelate some pictures (i.e., change them into pictures with mosaic). Here's how he is gonna make it: for each picture, he divides the picture into n x...
分类:其他好文   时间:2014-07-09 12:14:13    阅读次数:433
HDU1698 Just a Hook 【线段树】+【成段更新】+【lazy标记】
Just a Hook Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 15889    Accepted Submission(s): 7897 Problem Description In the game o...
分类:其他好文   时间:2014-07-09 11:35:08    阅读次数:215
HDU-1255-覆盖的面积(线段树)
Problem Description 给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积.   Input 输入数据的第一行是一个正整数T(1 注意:本题的输入数据较多,推荐使用scanf读入数据.   Output 对于每组测试数据,请计算出被这些矩形覆盖过至少两次的区域的面积.结果保留两位小数.   Sample Inpu...
分类:其他好文   时间:2014-07-08 21:41:49    阅读次数:274
线段树ADT
线段树应用: 有一个数列,初始时为 a1,a2,… aN (N 1)  将 ai 的值加上 val ; 2)  对于一个区间[l,r],该区间的和。 3)  对于一个区间[l,r],求该区间的最大值。 数据结构: //Node Type struct Node{ int left, right; int max, sum; } tree[maxn]; /* tree[k]'...
分类:其他好文   时间:2014-07-08 21:31:33    阅读次数:237
Codeforces 444C(线段树)
区间颜色不一致就更新到底,否则lazy标记 #include #include #include #include using namespace std; #define lc l,m,index<<1 #define rc m+1,r,index<<1|1 #define N 100005 #define ll __int64 struct node { bool same; ll c...
分类:其他好文   时间:2014-07-08 18:00:56    阅读次数:226
POJ-2892-Tunnel Warfare(线段树)
Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a...
分类:其他好文   时间:2014-07-08 16:51:42    阅读次数:506
HDU 1394 Minimum Inversion Number.(线段树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1394...
分类:其他好文   时间:2014-07-08 16:27:04    阅读次数:138
HDOJ1166 敌兵布阵 【线段树】
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 39591    Accepted Submission(s): 16726 Problem Description C国的死对头A国这段时间正在进行军事演...
分类:其他好文   时间:2014-07-08 13:21:42    阅读次数:158
HDU-1828-Picture(线段树)
Problem Description A number of rectangular posters, photographs and other pictures of the same shape are pasted on a wall. Their sides are all vertical or horizontal. Each rectangle can be partially...
分类:其他好文   时间:2014-07-08 11:10:23    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!