![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构(Data structure)
夜拾柒
In the future, there will be no retreat in horror.
展开
-
杭电acm5480
Conturbatio Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 461 Accepted Submission(s): 212 Problem Description There are many rook on a c原创 2015-09-29 21:34:30 · 232 阅读 · 0 评论 -
线段树模板
线段树点更新: struct node{ int l,r,maxn,sum; }tree[N<<2]; void build(int m,int l,int r){ tree[m].l = l; tree[m].r = r; if(l == r){ tree[m].maxn = a[l];//先将每个底层节点的数据存储在a[i]中,建树时原创 2016-07-24 11:36:58 · 217 阅读 · 0 评论 -
STL之优先队列
优先级队列,以前刷题的时候用的比较熟,现在竟然我只能记得它的关键字是priority_queue(太伤了)。在一些定义了权重的地方这个数据结构是很有用的。 先回顾队列的定义:队列(queue)维护了一组对象,进入队列的对象被放置在尾部,下一个被取出的元素则取自队列的首部。priority_queue特别之处在于,允许用户为队列中存储的元素设置优先级。这种队列不是直接将新元素放置在队列尾部,而转载 2016-07-26 21:07:12 · 255 阅读 · 0 评论