
数据结构-线段树
文章平均质量分 80
snowy_smile
终于在ICPC World Final里拿到了气球!
再努力一点吧,坚持下去吧,梦想是会实现的! 人生会有低谷,但我更相信,未来也会有更多梦想能够实现~
展开
-
【2015-2016 ACM-ICPC, NEERC, Southern Subregional Contest G】【数据结构-线段树】Hiring 准备时间完成时间最早完成日期
G. Hiringtime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputThe head of human resources department decided to hire a new employee. He created a test exercise for candidates which should be accomplishe原创 2015-11-08 13:38:37 · 869 阅读 · 0 评论 -
【HDU5649 BestCoder Round 76 (div1)D】【二分+线段树】DZY Loves Sorting 全排列1~n 区间升序降序排序 最后k位置的数是几
DZY Loves Sorting Accepts: 6 Submissions: 8 Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)问题描述DZY有一个数列a[1..n]a[1..n],它是1\sim n1∼n这nn个正整数的一个排列。现在他想支持两种操作:0\,\, l\,\, r0lr: 将a[l..r]a[l..r]原地升序排序。1 \,\,l \,\原创 2016-03-20 10:05:04 · 1447 阅读 · 0 评论 -
【2016杭电女生赛1008】【数据结构 动态节点线段树】Claris Loves Painting
#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;void fre() { freopen("c://test//input.in", "r", stdin); freope原创 2016-05-22 23:42:00 · 1589 阅读 · 0 评论 -
【HDU5751 BestCoder Round 84E】【FFT + 线段树求最值】Eades 最大数出现次数为[1~n]的区间个数
Eades Accepts: 1 Submissions: 11 Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)问题描述Peter有一个序列a_1, a_2, ..., a_na1,a2,...,an.原创 2016-07-25 09:36:18 · 1980 阅读 · 0 评论 -
【HDU5741 2016 Multi-University Training Contest 2H】【线段树 扫描线】Helter Skelter 超级01串是否有恰好x个0y个1的子串
Helter SkelterTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 647 Accepted Submission(s): 188Problem DescriptionA non-empty st原创 2016-07-28 10:36:55 · 1049 阅读 · 0 评论 -
【Codeforces Round 370 (Div 2) E】【线段树 等比数列 区间合并】Memory and Casinos 赌场区间[l,r] l进r先出的概率
E. Memory and Casinostime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputThere are n casinos lined in a row. I原创 2016-09-12 07:11:48 · 1897 阅读 · 0 评论 -
【HDU5927 2016CCPC东北地区大学生程序设计竞赛 - 重现赛 F】【dfs序 + 线段树 or 树状数组 复杂度计算】Auxiliary Set 一个点如果是好点或是两个好点的LCA就是好
Auxiliary SetTime Limit: 9000/4500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 632 Accepted Submission(s): 187Problem DescriptionGiven a rooted tre原创 2016-10-08 16:40:06 · 693 阅读 · 0 评论 -
【HDU5930 2016CCPC东北地区大学生程序设计竞赛 - 重现赛 I】【线段树 预处理加变更贡献】GCD 动态修改维护全局gcd数量
Basic Data StructureTime Limit: 7000/3500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 516 Accepted Submission(s): 150Problem DescriptionMr. Frog le原创 2016-10-08 16:43:52 · 2242 阅读 · 2 评论 -
【Codeforces Round 169 (Div 2) E】【数据结构区间维护】Little Girl and Problem on Trees 大菊花树的距离性修改查询
E. Little Girl and Problem on Treestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA little girl loves pro原创 2017-07-02 20:54:00 · 571 阅读 · 0 评论 -
【Good Bye 2014E】【贪心 单调栈+线段树】New Year Domino 至少增加多高长度的多米诺骨牌才可推x倒y
New Year Dominotime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCelebrating the new year, many people post原创 2016-03-21 09:10:22 · 1956 阅读 · 0 评论 -
【HDU5638 BestCoder Round 74 (div1)C】【贪心 线段树or树套树or队列】Toposort n点m边删k边使得拓扑序最小
ToposortTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 256 Accepted Submission(s): 99Problem DescriptionThere is a directed a原创 2016-03-08 19:16:34 · 728 阅读 · 0 评论 -
【Codeforces Round 326 (Div 2)E】【树链剖分】Duff in the Army 树上给定路径上编号最小的几个人
E. Duff in the Armytime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputRecently Duff has been a soldier in the a原创 2015-11-10 11:39:35 · 632 阅读 · 0 评论 -
【Code Forces 321E】【线段树+字符串哈希】Kefa and Watch 字符串修改 循环节判定
【Code Forces 321E】【线段树+字符串哈希】Kefa and Watch 字符串修改 循环节判定原创 2015-09-23 10:50:03 · 1136 阅读 · 0 评论 -
【Codeforces Round 333 (Div 2)D】【线段树 or ST-RMQ 初始化78msAC】Lipshitz Sequence 若干区间询问所有子区间的答案和
D. Lipshitz Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA function is called Lipschitz continu原创 2015-11-25 19:16:24 · 1018 阅读 · 0 评论 -
【Educational Codeforces Round 2E】【STL-map 启发式合并 or 线段树动态开节点 】Lomsat gelral 一棵树每点一个颜色问每个节点子树的颜色众数之和
E. Lomsat gelraltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rooted tree with root in ver原创 2015-11-30 19:17:51 · 1544 阅读 · 0 评论 -
【2015ZUFE新生赛网络同步赛L】【线段树找最小值最早出现位置 破环成链】God Wang 环上找小于等于tim的第一个数
#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;void fre(){freopen("c://test//input.in","r",stdin);freopen("c:原创 2015-12-07 12:20:48 · 966 阅读 · 0 评论 -
【Codeforces Round 271 (Div 2)E】【离散化线段树】Pillars 最长连续序列使得序列相邻的数差值至少为k
E. Pillarstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMarmot found a row with n pillars. The i-th pilla原创 2015-12-08 11:49:55 · 678 阅读 · 0 评论 -
【Codeforces Round 271 (Div 2)F】【贪心 线段树】Ant colony 区间段内是其他所有数因子的数的个数
Ant colonytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMole is hungry again. He found one ant colony, cons原创 2015-12-08 11:57:35 · 637 阅读 · 0 评论 -
【Educational Codeforces Round 6E】【线段树 dfs序】New Year Tree 子树颜色修改子树颜色数
E. New Year Treetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe New Year holidays are over, but Resha do原创 2016-03-01 18:22:49 · 1182 阅读 · 0 评论 -
【“盛大游戏杯”第15届上海大学程序设计联赛 M】【线段树 时间维度线段树 前缀和标记 离线询问】风力观测 历史最大值
风力观测发布时间: 2017年7月8日 22:05 最后更新: 2017年7月8日 23:29 时间限制: 1000ms 内存限制: 128M描述小Y正在观测y地区的风力情况,他在一条直线上依此设定了n个观测点,并观测与直线垂直方向的风力值,风力有时是正向的也有时是反向的,规定正向时的风力值为正数,他发现每次风力值的变化都可以表示为观测点上一条线段[L,R]原创 2017-07-12 11:56:19 · 658 阅读 · 0 评论