随笔分类 -  数据结构--线段树

摘要:1012: [JSOI2008]最大数maxnumber Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。2、 插入操作。语法:A n 功能:将n加上t,其 阅读全文
posted @ 2017-08-14 14:50 勿忘初心0924 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Maximum Sequence Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1152 Accepted Submission(s): 537 阅读全文
posted @ 2017-07-28 17:39 勿忘初心0924 阅读(206) 评论(0) 推荐(0) 编辑
摘要:覆盖的面积 Problem Description 给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input 输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行 阅读全文
posted @ 2017-06-09 12:01 勿忘初心0924 阅读(229) 评论(0) 推荐(0) 编辑
摘要:Tunnel Warfare Time Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Tunnel Warfare Submit Status Description During the 阅读全文
posted @ 2017-03-26 11:01 勿忘初心0924 阅读(264) 评论(0) 推荐(0) 编辑
摘要:Mayor's posters Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description The citizens of Bytetown, AB, could not 阅读全文
posted @ 2017-03-23 22:34 勿忘初心0924 阅读(295) 评论(0) 推荐(0) 编辑
摘要:Count the Colors Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Submit Status Description Painting some colored segments on a line 阅读全文
posted @ 2017-03-23 18:36 勿忘初心0924 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Can you answer these queries? Time Limit:2000MS Memory Limit:65768KB 64bit IO Format:%I64d & %I64u Submit Status Can you answer these queries? Submit  阅读全文
posted @ 2017-03-20 13:04 勿忘初心0924 阅读(249) 评论(0) 推荐(0) 编辑
摘要:Color the Ball Problem Description There are infinite balls in a line (numbered 1 2 3 ....), and initially all of them are paint black. Now Jim use a 阅读全文
posted @ 2017-03-13 15:48 勿忘初心0924 阅读(473) 评论(0) 推荐(0) 编辑
摘要:LCIS Problem Description Given n integers.You have two operations:U A B: replace the Ath number by B. (index counting from 0)Q A B: output the length 阅读全文
posted @ 2017-03-12 17:52 勿忘初心0924 阅读(212) 评论(0) 推荐(0) 编辑
摘要:Luck and Love Problem Description 世界上上最远的距离不是相隔天涯海角而是我在你面前可你却不知道我爱你 ―― 张小娴前段日子,枫冰叶子给Wiskey做了个征婚启事,聘礼达到500万哦,天哪,可是天文数字了啊,不知多少MM蜂拥而至,顿时万人空巷,连扫地的大妈都来凑热闹来 阅读全文
posted @ 2017-03-11 13:47 勿忘初心0924 阅读(214) 评论(0) 推荐(0) 编辑
摘要:Atlantis Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11532 Accepted Submission(s): 4898 Probl 阅读全文
posted @ 2016-11-01 23:56 勿忘初心0924 阅读(243) 评论(0) 推荐(0) 编辑
摘要:Count Color Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 43773 Accepted: 13249 Description Chosen Problem Solving and Program design as 阅读全文
posted @ 2016-10-31 21:32 勿忘初心0924 阅读(230) 评论(0) 推荐(0) 编辑
摘要:Just a Hook Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 29106 Accepted Submission(s): 14396 P 阅读全文
posted @ 2016-10-31 10:54 勿忘初心0924 阅读(196) 评论(0) 推荐(0) 编辑
摘要:A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 99895 Accepted: 31162 Case Time Limit: 2000MS Description Y 阅读全文
posted @ 2016-10-30 21:59 勿忘初心0924 阅读(151) 评论(0) 推荐(0) 编辑
摘要:Buy Tickets Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 18936 Accepted: 9401 Description Railway tickets were difficult to buy around t 阅读全文
posted @ 2016-10-29 00:05 勿忘初心0924 阅读(238) 评论(0) 推荐(0) 编辑
摘要:Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 20145 Accepted Submission(s): 8391 Pro 阅读全文
posted @ 2016-10-28 21:09 勿忘初心0924 阅读(410) 评论(0) 推荐(0) 编辑
摘要:I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 67140 Accepted Submission(s): 26122 Pro 阅读全文
posted @ 2016-10-28 19:57 勿忘初心0924 阅读(148) 评论(0) 推荐(0) 编辑
摘要:敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 79629 Accepted Submission(s): 33691 Problem 阅读全文
posted @ 2016-10-28 19:45 勿忘初心0924 阅读(262) 评论(0) 推荐(0) 编辑
摘要:线段树总结 ——这个周末训练赛和codeforces,加上自己有点偷懒导致进度严重推迟 线段树,顾名思义是在树上的线段,通过建树来维护你需要的操作,基本的操作有:区间求和,区间求最值,区间异或(这个实际上和区间更新差不多,就是加上值这个操作换成了异或),区间覆盖,扫描线求面积,线段树求区间连续字段。 阅读全文
posted @ 2016-10-18 00:26 勿忘初心0924 阅读(1527) 评论(0) 推荐(0) 编辑