看完题目你很容易想到,这个题目的关键点就是如何把给出的数组还原成原数组。
还原的原数组之后不管是AC自动机 还是 kmp都可以解决 - -虽然我觉得kmp会超时的感觉。
那么如何还原这个字符串就是在个题目的难点。。。
gc$aaac
1234567
排序之后变成了
$aaaccg
3456271
然后你按照排序后的下标依次走过去
会发现
$->a-...
分类:
其他好文 时间:
2014-07-12 22:10:26
阅读次数:
256
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1698
题目大意:给你三种硬币,分别面值为1,2,3。初始时,面值都为1,后面没更改一次,就把这个区间的银币换位面值为 X的硬币,最后求所有的硬币面值是多少。
直接贴代码啦
code:
#include
#include
#define L(u) (u<<1)
#define R(u) (u<<...
分类:
其他好文 时间:
2014-07-12 21:29:25
阅读次数:
193
Problem Description
Xiao Ming is traveling around several cities by train. And the time on the train is very boring, so Xiao Ming will use the mobile Internet. We all know that mobile phone receives ...
分类:
其他好文 时间:
2014-07-12 21:28:48
阅读次数:
197
过山车
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 9745 Accepted Submission(s): 4294
Problem Description
RPG girls今天和大家一起去游乐场玩,...
分类:
其他好文 时间:
2014-07-12 19:37:36
阅读次数:
297
/*
J - Saving HDU
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit
Status
Practice
HDU 2111
Description
话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了。显然,作为多年拼搏的商人,XHD不会坐以待毙的...
分类:
其他好文 时间:
2014-07-12 19:18:17
阅读次数:
149
http://acm.hdu.edu.cn/showproblem.php?pid=2767
Proving Equivalences
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2926 Accepted Sub...
分类:
移动开发 时间:
2014-07-12 18:14:35
阅读次数:
243
Problem Description
Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Mario needs to save his lover. ...
分类:
其他好文 时间:
2014-07-12 17:57:06
阅读次数:
174
Machine Schedule
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 5371 Accepted Submission(s): 2658
Problem Description
As we all...
分类:
其他好文 时间:
2014-07-12 17:41:08
阅读次数:
241
一个很有意思的 BFS+DFS。附 数据。
本来今天的任务是多重背包,结果为了帮别人找WA点,自己也坑在这道题上了。
最好想了一组自己都没过的数据……果断换思路了。
以箱子为起点做BFS找最短。每次DFS判断人能不能移动到箱子的后面。
开始就我写一个BFS,什么数据都过了。这组过不了
1
7 4
0 0 0 0
0 0 1 0
0 2 0 3
1...
分类:
其他好文 时间:
2014-07-12 16:57:02
阅读次数:
214
Problem Description
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime...
分类:
其他好文 时间:
2014-07-12 16:42:15
阅读次数:
271