![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
听竹
这个作者很懒,什么都没留下…
展开
-
线段树之Find the minimum
Find the minimumTime Limit: 2 Sec Memory Limit: 128 MBSubmit: 90 Solved: 22[Submit][Status][Web Board]DescriptionGiven an integer array of size N, we define two kind of operators:1.原创 2013-07-16 19:48:19 · 467 阅读 · 0 评论 -
线段树之poj 2777
Count ColorTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 30727 Accepted: 9174DescriptionChosen Problem Solving and Program design as an optional cours原创 2013-07-17 10:42:45 · 393 阅读 · 0 评论 -
hdu 4399
DescriptionYou are given two strings s1[0..l1], s2[0..l2] and Q - number of queries.Your task is to answer next queries: 1) 1 a i c - you should set i-th character in a-th string to c; 2)原创 2013-08-08 16:00:25 · 1075 阅读 · 0 评论 -
poj 3468 (线段树区间更新及求和)
# include # include # define MN 400000using namespace std;long long a[100005];struct node{ int left,right,mid; long long add,x;}tree[MN];void build(int le,int ri,int num)//构建一个线段树{ tree原创 2014-06-27 11:25:12 · 391 阅读 · 0 评论 -
树状数组
1、概述树状数组(binary indexed tree),是一种设计新颖的数组结构,它能够高效地获取数组中连续n个数的和。概括说,树状数组通常用于解决以下问题:数组{a}中的元素可能不断地被修改,怎样才能快速地获取连续几个数的和?2、树状数组基本操作传统数组(共n个元素)的元素修改和连续元素求和的复杂度分别为O(1)和O(n)。树状数组通过将线性结构转换成伪树状结构(线性结构只能逐个原创 2014-07-31 10:23:36 · 447 阅读 · 0 评论