数据结构
文章平均质量分 84
mowayao
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU4417-Super Mario
Super Mario Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2183 Accepted Submission(s): 1061 Problem Description Mario is world-fam原创 2014-06-17 23:48:26 · 2468 阅读 · 0 评论 -
UVa 12715 Watching the Kangaroo(二分)
UVa 12715 Watching the Kangaroo(二分)原创 2014-10-14 12:29:22 · 1258 阅读 · 0 评论 -
HDU4288-Coder(线段树+离线+离散化)
Coder Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3183 Accepted Submission(s): 1254 Problem Description In mathematics a原创 2014-09-03 13:19:22 · 977 阅读 · 0 评论 -
HDU 4286 Data Handler (双端队列)
Data Handler Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2455 Accepted Submission(s): 616 Problem Description You are in原创 2014-09-12 21:47:49 · 816 阅读 · 0 评论 -
SGU 271 Book Pile(双端队列)
271. Book Pile time limit per test: 0.25 sec. memory limit per test: 65536 KB input: standard output: standard There is a pile of N books on the table. Two types of operations are p原创 2014-09-12 17:37:13 · 1242 阅读 · 0 评论 -
URAL1306-Sequence Median(优先队列)
1306. Sequence Median Time limit: 1.0 second Memory limit: 1 MB Language limit: C, C++, Pascal Given a sequence of N nonnegative integers. Let's define the median of such sequence. If N is原创 2014-08-15 20:30:51 · 991 阅读 · 0 评论 -
HDU4509-湫湫系列故事——减肥记II(线段树)
湫湫系列故事——减肥记II Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2395 Accepted Submission(s): 1018 Problem Description 虽然制定了减肥食谱,原创 2014-08-15 18:34:36 · 691 阅读 · 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): 843 Problem Description Recent原创 2014-08-14 13:06:49 · 785 阅读 · 0 评论 -
HDU4902-Nice boat(线段树)
Nice boat Time Limit: 30000/15000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1455 Accepted Submission(s): 645 Problem Description There is an o原创 2014-08-14 17:11:22 · 801 阅读 · 0 评论 -
HDU4719-Oh My Holy FFF(DP线段树优化)
Oh My Holy FFF Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 606 Accepted Submission(s): 141 Problem Description N soldiers fr原创 2014-08-19 21:04:02 · 1369 阅读 · 0 评论 -
HDU4911-Inversion(树状数组)
Inversion Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 914 Accepted Submission(s): 380 Problem Description bobo has a seque原创 2014-08-06 20:49:53 · 844 阅读 · 0 评论 -
HDU4300-Clairewd’s message(KMP前缀匹配后缀)
Clairewd’s message Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3228 Accepted Submission(s): 1248 Problem Description Clairew原创 2014-07-09 21:23:50 · 1286 阅读 · 0 评论 -
HDU4763-Theme Section(KMP+二分)
Theme Section Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1098 Accepted Submission(s): 570 Problem Description It's time for原创 2014-07-08 15:11:28 · 944 阅读 · 1 评论 -
HDU3336-Count the string(KMP)
Count the string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4449 Accepted Submission(s): 2094 Problem Description It is wel原创 2014-07-08 13:49:52 · 731 阅读 · 0 评论 -
POJ3928 Ping pong
Ping pong Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1556 Accepted: 596 Description N(3<=N<=20000) ping pong players live along a west-east street(con原创 2013-10-02 22:20:56 · 727 阅读 · 0 评论 -
HDU-3473Minimum Sum
Problem Description You 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 · 813 阅读 · 0 评论 -
HDU4251-The Famous ICPC Team Again(划分树)
Problem Description When 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 · 772 阅读 · 0 评论 -
POJ2406-Power Strings(kmp循环节)
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 31111 Accepted: 12982 Description Given two strings a and b we define a*b to be their concate原创 2014-07-08 14:17:31 · 714 阅读 · 0 评论 -
hdu2665-Kth number
Kth number Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4585 Accepted Submission(s): 1461 Problem Description Give you a sequenc原创 2014-06-16 21:00:57 · 748 阅读 · 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 · 995 阅读 · 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 · 1057 阅读 · 0 评论 -
HDU1806 Frequent values
Problem Description You 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 · 845 阅读 · 0 评论 -
HDU1540 Tunnel Warfare
Problem Description During 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 · 863 阅读 · 0 评论 -
线段树专题
HDU 1754 Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多组测试,请处理到文件结束。 在每个测原创 2014-05-04 16:00:22 · 876 阅读 · 0 评论 -
ZOJ2642Feel Good
Feel Good Time Limit: 10 Seconds Memory Limit: 32768 KB Special Judge Bill is developing a new mathematical theory for human emotions. His recent investigations are dedicated to studyi原创 2013-12-03 00:16:16 · 1439 阅读 · 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 · 1029 阅读 · 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 · 914 阅读 · 0 评论 -
HDOJ3016Man Down(线段树(区间更新,单点查询)+DP)
Man Down Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1389 Accepted Submission(s): 481 Problem Description The Game “Man Down原创 2013-10-05 15:45:20 · 736 阅读 · 0 评论
分享