
数据结构
文章平均质量分 84
mowayao
这个作者很懒,什么都没留下…
展开
-
POJ3928 Ping pong
Ping pongTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1556 Accepted: 596DescriptionN(3<=N<=20000) ping pong players live along a west-east street(con原创 2013-10-02 22:20:56 · 673 阅读 · 0 评论 -
HDU3336-Count the string(KMP)
Count the stringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4449 Accepted Submission(s): 2094Problem DescriptionIt is wel原创 2014-07-08 13:49:52 · 682 阅读 · 0 评论 -
HDU4763-Theme Section(KMP+二分)
Theme SectionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1098 Accepted Submission(s): 570Problem DescriptionIt's time for原创 2014-07-08 15:11:28 · 855 阅读 · 1 评论 -
HDU4300-Clairewd’s message(KMP前缀匹配后缀)
Clairewd’s messageTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3228 Accepted Submission(s): 1248Problem DescriptionClairew原创 2014-07-09 21:23:50 · 1223 阅读 · 0 评论 -
HDU4911-Inversion(树状数组)
InversionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 914 Accepted Submission(s): 380Problem Descriptionbobo has a seque原创 2014-08-06 20:49:53 · 790 阅读 · 0 评论 -
HDU4719-Oh My Holy FFF(DP线段树优化)
Oh My Holy FFFTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 606 Accepted Submission(s): 141Problem DescriptionN soldiers fr原创 2014-08-19 21:04:02 · 1241 阅读 · 0 评论 -
HDU4902-Nice boat(线段树)
Nice boatTime Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1455 Accepted Submission(s): 645Problem DescriptionThere is an o原创 2014-08-14 17:11:22 · 737 阅读 · 0 评论 -
HDU4893-Wow! Such Sequence!(线段树)
Wow! Such Sequence!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2793 Accepted Submission(s): 843Problem DescriptionRecent原创 2014-08-14 13:06:49 · 735 阅读 · 0 评论 -
HDU4509-湫湫系列故事——减肥记II(线段树)
湫湫系列故事——减肥记IITime Limit: 5000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2395 Accepted Submission(s): 1018Problem Description 虽然制定了减肥食谱,原创 2014-08-15 18:34:36 · 645 阅读 · 0 评论 -
URAL1306-Sequence Median(优先队列)
1306. Sequence MedianTime limit: 1.0 secondMemory limit: 1 MBLanguage limit: C, C++, PascalGiven a sequence of N nonnegative integers. Let's define the median of such sequence. If N is原创 2014-08-15 20:30:51 · 932 阅读 · 0 评论 -
SGU 271 Book Pile(双端队列)
271. Book Piletime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardThere is a pile of N books on the table. Two types of operations are p原创 2014-09-12 17:37:13 · 1164 阅读 · 0 评论 -
HDU 4286 Data Handler (双端队列)
Data HandlerTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2455 Accepted Submission(s): 616Problem Description You are in原创 2014-09-12 21:47:49 · 763 阅读 · 0 评论 -
HDU4288-Coder(线段树+离线+离散化)
CoderTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3183 Accepted Submission(s): 1254Problem Description In mathematics a原创 2014-09-03 13:19:22 · 928 阅读 · 0 评论 -
HDU4417-Super Mario
Super MarioTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2183 Accepted Submission(s): 1061Problem DescriptionMario is world-fam原创 2014-06-17 23:48:26 · 676 阅读 · 0 评论 -
HDU-3473Minimum Sum
Problem DescriptionYou are given N positive integers, denoted as x0, x1 ... xN-1. Then give you some intervals [l, r]. For each interval, you need to find a number x to make as small as possible!原创 2014-06-17 20:51:07 · 755 阅读 · 0 评论 -
HDOJ3016Man Down(线段树(区间更新,单点查询)+DP)
Man DownTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1389 Accepted Submission(s): 481Problem DescriptionThe Game “Man Down原创 2013-10-05 15:45:20 · 667 阅读 · 0 评论 -
信息战(四)——战场演练(线段树,树状数组)
两种做法:线段树和树状数组TLE了几次= = 主要是cout#include #include #include using namespace std;const int maxn = 30000+10;const int maxm = 65535*3+1;int n,num[maxn],C[maxm];inline int lowbit(int x){ re原创 2013-10-12 22:22:51 · 860 阅读 · 0 评论 -
URAL1019. Line Painting
The segment of numerical axis from 0 to 109 is painted into white color. After that some parts of this segment are painted into black, then some into white again and so on. In total there have been原创 2013-11-08 20:05:21 · 974 阅读 · 0 评论 -
ZOJ2642Feel Good
Feel GoodTime Limit: 10 Seconds Memory Limit: 32768 KB Special JudgeBill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studyi原创 2013-12-03 00:16:16 · 1360 阅读 · 0 评论 -
线段树专题
HDU 1754Problem Description很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。在每个测原创 2014-05-04 16:00:22 · 806 阅读 · 0 评论 -
HDU1540 Tunnel Warfare
Problem DescriptionDuring the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels原创 2014-05-06 13:08:47 · 792 阅读 · 0 评论 -
HDU1806 Frequent values
Problem DescriptionYou are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1 ≤ i ≤ j ≤原创 2014-05-05 22:43:18 · 791 阅读 · 0 评论 -
HDU2430-Beans
Mr. Pote's shop sells beans now. He has N bags of beans in his warehouse, and he has numbered them with 1, 2, …, N according to their expired dates. The i-th bag contains Wi units of beans. For sellin原创 2014-05-09 16:19:09 · 988 阅读 · 0 评论 -
ZOJ3279Ants(树状数组前缀和)
echo is a curious and clever girl, and she is addicted to the ants recently.She knows that the ants are divided into many levels depends on ability, also, she finds the number of each level will cha原创 2013-11-30 21:51:46 · 958 阅读 · 0 评论 -
hdu2665-Kth number
Kth numberTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4585 Accepted Submission(s): 1461Problem DescriptionGive you a sequenc原创 2014-06-16 21:00:57 · 698 阅读 · 0 评论 -
POJ2406-Power Strings(kmp循环节)
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 31111 Accepted: 12982DescriptionGiven two strings a and b we define a*b to be their concate原创 2014-07-08 14:17:31 · 642 阅读 · 0 评论 -
HDU4251-The Famous ICPC Team Again(划分树)
Problem DescriptionWhen Mr. B, Mr. G and Mr. M were preparing for the 2012 ACM-ICPC World Final Contest, Mr. B had collected a large set of contest problems for their daily training. When they decid原创 2014-06-17 11:20:12 · 705 阅读 · 0 评论 -
UVa 12715 Watching the Kangaroo(二分)
UVa 12715 Watching the Kangaroo(二分)原创 2014-10-14 12:29:22 · 1199 阅读 · 0 评论