![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
疯的世界
这个作者很懒,什么都没留下…
展开
-
线段树 模版
#include #includeusing namespace std;const int maxn=100002;int sum[maxn*4]={0};//这个要初始化为0int col[maxn*4]={0};//标记每个节点,初始化为0//将子节点的数据传到根节点void PushUp(int rt){//存放节点的总和 sum[rt]=sum[rt*2]+su原创 2012-08-10 00:15:11 · 923 阅读 · 0 评论 -
hdu_1166 Counting Black
Counting BlackTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8951Accepted: 5775题目链接:http://poj.org/problem?id=1656DescriptionThere is a boar原创 2012-07-27 16:26:22 · 829 阅读 · 0 评论 -
poj_3468 A Simple Problem with Integers
A Simple Problem with IntegersTime Limit: 5000MSMemory Limit: 131072KTotal Submissions: 31675Accepted: 8989Case Time Limit: 2000MS 题目链原创 2012-07-27 16:22:31 · 794 阅读 · 0 评论 -
poj_3264 Balanced Lineup
Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 23380Accepted: 10882Case Time Limit: 2000MS题目链接:http://poj.org/problem?i原创 2012-07-31 13:26:27 · 649 阅读 · 0 评论 -
poj_2352 Stars ( 线段树)
StarsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 22828Accepted: 9949题目链接:http://poj.org/problem?id=2352DescriptionAstronomers often exami原创 2012-09-01 09:53:53 · 910 阅读 · 0 评论 -
Sliding Window poj 2823
题目链接:http://poj.org/problem?id=2823Sliding WindowTime Limit: 12000MSMemory Limit: 65536KTotal Submissions: 29378Accepted: 8734Case Time Limit: 5000MS原创 2013-03-23 19:37:18 · 935 阅读 · 0 评论 -
Count Color poj 2777
题目链接:http://poj.org/problem?id=2777Count ColorTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 29470Accepted: 8800DescriptionChosen ProblemSol原创 2013-03-23 19:40:52 · 1071 阅读 · 0 评论 -
Frequentvalues poj 3368
题目链接:http://poj.org/problem?id=3368FrequentvaluesTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 10917Accepted: 4004DescriptionYou are given原创 2013-03-23 19:42:33 · 952 阅读 · 0 评论