数据结构
文章平均质量分 83
梧桐下的四叶草
这个世界并没有我看上去的那么简单,人各有命,上天注定。有人天生为王,有人落草为寇。脚下的路,如果不是你自己的选择。那这旅程的终点在哪儿,也没人知道。你会走到哪儿,会碰到谁。都不一定。
展开
-
卿学姐种花(线段树)
卿学姐种花 Time Limit: 0/7500MS (Java/Others) Memory Limit: 0/220000KB (Java/Others) 众所周知,在喵哈原创 2016-03-24 21:56:40 · 912 阅读 · 0 评论 -
CodeForces 482B-Interesting Array(线段树)
A - Interesting ArrayTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 482BAppoint description: System Crawler (2016-03-27原创 2016-03-29 18:05:05 · 613 阅读 · 0 评论 -
CSU 1553-Good subsequence(RMQ)
Good subsequenceDescriptionGive you a sequence of n numbers, and a number k you should find the max length of Good subsequence. Good subsequence is a continuous subsequence of the given原创 2015-12-07 21:55:14 · 359 阅读 · 0 评论 -
CSU 1556-Jerry's trouble(快速幂)
1556: Jerry's troubleTime Limit: 10 Sec Memory Limit: 256 MBSubmit: 741 Solved: 299[Submit][Status][Web Board]Description Jerry is caught by Tom. He was penned up in one room with原创 2015-12-07 21:57:12 · 291 阅读 · 0 评论 -
HDU-1541 Stars(树状数组+逆序数)
StarsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6957 Accepted Submission(s): 2744Problem DescriptionAstronomers often ex原创 2015-12-05 00:07:43 · 376 阅读 · 0 评论 -
HDU-5384Danganronpa(AC自动机模板)
DanganronpaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 971 Accepted Submission(s): 522Problem DescriptionDanganronpa is原创 2015-12-05 00:03:21 · 344 阅读 · 0 评论 -
Approximating a Constant Range(RMQ)
B. Approximating a Constant Rangetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen Xellos was doing a p原创 2015-11-26 11:40:28 · 345 阅读 · 0 评论 -
HDU 1800-Flying to the Mars(trie树)
E - Flying to the MarsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1800Appoint description: System Crawler (2015-11-20)原创 2015-11-23 23:00:49 · 298 阅读 · 0 评论 -
CSU 1555-Inversion Sequence(逆序数还原,线段树实现)
1555: Inversion SequenceTime Limit: 2 Sec Memory Limit: 256 MBSubmit: 422 Solved: 145[Submit][Status][Web Board]DescriptionFor sequence i1, i2, i3, … , iN, we set aj to be the numb原创 2015-12-10 19:58:31 · 633 阅读 · 0 评论 -
HDU 1247-Hat’s Words(trie树)
D - Hat’s WordsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1247Appoint description: System Crawler (2015-11-23)Descrip原创 2015-11-23 22:53:50 · 390 阅读 · 0 评论 -
Digits Count(线段树,区间更新)
G - Digits CountTime Limit:10000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2105Appoint description: System Crawler (2015-10-31)Desc原创 2015-10-31 12:16:21 · 455 阅读 · 0 评论 -
统计难题
C - 统计难题Time Limit:2000MS Memory Limit:65535KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(原创 2015-07-24 16:33:44 · 361 阅读 · 0 评论 -
A Simple Problem with Integers(线段树,区间求和)
I - A Simple Problem with IntegersTime Limit:5000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionYou have N integers, A1, A2, ... , AN. You原创 2015-08-02 22:53:32 · 316 阅读 · 0 评论 -
Just a Hook(线段树,区间更新)
A - Just a HookTime Limit:2000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1698Appoint description: System Crawler (2015-10-10)Descrip原创 2015-10-15 12:52:04 · 710 阅读 · 0 评论 -
强迫症盗墓者(二叉树+规律)
1525: 强迫症盗墓者Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 46 Solved: 14[Submit][Status][Web Board]Description二叉树(Binary Tree):每个节点最多有两个子树的树结构。 满二叉树(Full Binary Tree):除最后一层无任何原创 2015-10-28 13:54:16 · 660 阅读 · 0 评论 -
Billboard(线段树,单点更新)
A - BillboardTime Limit:8000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2795Appoint description: bupt_admin_13 (2015-07-28)System Crawler (2原创 2015-10-12 22:39:52 · 393 阅读 · 0 评论 -
RMQ with Shifts
RMQ with Shifts时间限制:1000 ms | 内存限制:65535 KB难度:3描述 In the traditional RMQ (Range Minimum Query) problem, we have a static array A. Then for each query (L, R) (L In this pro原创 2015-09-23 00:28:12 · 544 阅读 · 0 评论 -
HDU 4578-Transformation(线段树)
J - TransformationTime Limit:8000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 4578Appoint description: System Crawler (2015-11-11)Desc原创 2015-11-11 23:57:45 · 1057 阅读 · 0 评论 -
CodeForces 319B-Psychos in a Line(单调队列)
B - Psychos in a LineTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 319BAppoint description: pearfish16 (2015-03-08)Sys原创 2016-03-30 14:28:35 · 524 阅读 · 0 评论 -
CodeForces 377B-Preparing for the Contest(二分+贪心)
C - Preparing for the ContestTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 377BAppoint description: System Crawler (20原创 2016-03-31 21:51:51 · 597 阅读 · 0 评论 -
BestCoder Round #81 (div.2)-String(尺取法)
String Accepts: 84 Submissions: 373 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)问题描述有一个 10\leq10≤长度\leq 1,000,000≤1,000,000 的字符串,仅由小写字母原创 2016-04-22 23:32:55 · 329 阅读 · 0 评论 -
【POJ2887】【块状链表】Big String
【POJ2887】【块状链表】Big String转载自:http://www.cnblogs.com/hoskey/p/4322417.htmlDescriptionYou are given a string and supposed to do some string manipulations.InputThe fir转载 2016-04-22 11:32:10 · 583 阅读 · 0 评论 -
HDU 1255-覆盖的面积(线段树+扫描线)
C - 覆盖的面积Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1255Appoint description: System Crawler (2016-04-30)Description原创 2016-05-05 20:12:38 · 811 阅读 · 10 评论 -
HDU 1542-Atlantis(线段树+扫描线)
A - AtlantisTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1542Appoint description: System Crawler (2016-05-04)Description原创 2016-05-05 20:05:46 · 406 阅读 · 0 评论 -
POJ 1862- Stripies(优先队列)
M - StripiesTime Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1862Appoint description: System Crawler (2016-04-28)Descriptio原创 2016-05-05 14:10:49 · 351 阅读 · 0 评论 -
卿学姐与公主(线段树区间求最大值)
A - 卿学姐与公主Time Limit: 2000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)Submit Status某日,百无聊赖的卿学姐打开了某11区的某魔幻游戏在这个魔幻的游戏里,生活着一个美丽的公主,但现在公主被关押在了魔王的城堡中。英勇原创 2016-04-20 20:24:44 · 637 阅读 · 0 评论 -
卿学姐与基本法(线段树+区间更新)
卿学姐与基本法Time Limit: 2000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)Submit Status“做专题也要按照基本法”——蛤离开了诡异的村庄,卿学姐来到了威廉·圣·乱七八糟王国,这里的国王咸鱼王是个智障。国家涣散,盗贼四起,民不聊生。原创 2016-05-01 16:26:58 · 1059 阅读 · 0 评论 -
郭大侠与Rabi-Ribi(优先队列)
郭大侠与Rabi-RibiTime Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)Submit Status最近郭大侠迷上了玩Rabi-Ribi这个游戏。Rabi-Ribi呢,是一个打兔子的动作冒险游戏,萌萌哒的兔子在地上跑来跑去,好萌好原创 2016-05-01 16:49:06 · 752 阅读 · 0 评论 -
病毒侵袭
B - 病毒侵袭Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescription当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋――我们能在有生之年看到500年一遇的世界奇原创 2015-07-27 00:18:34 · 609 阅读 · 0 评论 -
Keywords Search(AC自动机)
A - Keywords SearchTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIn the modern time, Search engine came into the life of every原创 2015-07-26 17:53:27 · 462 阅读 · 0 评论 -
郭大侠与线上游戏(set)
思路:这道题目要求你在一个排好序的数列找中位数,所以可以开两个set去做,一个保存=(tail-head),每次输出储存右边的最小值就是中位数了。AC代码:#include #include #include #include #include#include#includeusing namespace std; #define T 100000原创 2016-04-25 14:55:39 · 509 阅读 · 0 评论 -
2016-scut-H. Lucky Array(分块)
H. Lucky ArrayTime Limit: 10 Sec, Memory Limit: 256 MBDescriptionPetya loves lucky numbers. Everybodyknows that lucky numbers are positive integers whose decimal representationcontains only the原创 2016-04-24 21:51:00 · 375 阅读 · 0 评论 -
二维树状数组
转载自:http://blog.csdn.net/z309241990/article/details/9615259 当要频繁的对数组元素进行修改,同时又要频繁的查询数组内任一区间元素之和的时候,可以考虑使用树状数组. 通常对一维数组最直接的算法可以在O(1)时间内完成一次修改,但是需要O(n)时间来进行一次查询.而树状数组的修改和查询均可在O(log(n))的时间内完成.转载 2016-03-25 17:24:00 · 257 阅读 · 0 评论 -
秋实大哥与快餐店(二进制+字典树)
秋实大哥与快餐店Time Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)Submit Status朝为田舍郎,暮登天子堂。秋实大哥从小就怀抱有远大的理想,所以他开了一家快餐店。秋实大哥根据菜的口感,给每一道菜一个唯一的CID,同时对于前来的客原创 2016-02-29 19:38:47 · 504 阅读 · 1 评论 -
CSU 1685-Entertainment Box(set+二分)
E - Entertainment BoxTime Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %lluSubmit Status Practice CSU 1685DescriptionInput原创 2016-03-13 14:37:31 · 547 阅读 · 0 评论 -
CSU 1684-Disastrous Downtime(set+二分)
D - Disastrous DowntimeTime Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %lluSubmit Status Practice CSU 1684DescriptionInput原创 2016-03-13 14:35:50 · 984 阅读 · 0 评论 -
zsc1567: 烦恼的小明&hdu 1007(分治)
1567: 烦恼的小明Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 115 Solved: 6[Submit][Status][Web Board]DescriptionA市政府2015年拿到了一笔教育资金,于是想建一所中学和一个图书馆。作为此项工程的策划工程师,小明要在A市n块空地上选两块来建中学和图书馆。曾经原创 2016-03-08 17:31:06 · 418 阅读 · 0 评论 -
Minimum Inversion Number(线段树)
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15151 Accepted Submission(s): 9250Problem Description原创 2015-10-10 16:35:40 · 289 阅读 · 0 评论 -
I Hate It
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 52842 Accepted Submission(s): 20756Problem Description很多学校流行一种比较的习惯。原创 2015-09-21 22:20:02 · 328 阅读 · 0 评论 -
POJ 2528-Mayor's posters(线段树+离散化)
C - Mayor's postersTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 2528Appoint description: System Crawler (2015-11-05)Des原创 2015-11-08 23:26:39 · 351 阅读 · 0 评论