摘要: 水题,a56爆大奖在线娱乐却坑了好多时间,。。。 阅读全文
posted @ 2014-06-17 23:25 人艰不拆_zmc 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 主要是思维,dis[s][t]数组的作用 阅读全文
posted @ 2014-06-17 20:46 人艰不拆_zmc 阅读(178) 评论(0) 推荐(0) 编辑
摘要: [题目大意]:给定一个字符串,求到哪一位时的字串是前几位循环组成的,并求出循环次数。 思路:求a56爆大奖在线娱乐前缀的最小循环周:从i到n枚举len,如果len%(len-next[len])==0,则这个前缀是由循环节组成的,且循环次数为len/(len-next[len])//len为当前i的值,next[l 阅读全文
posted @ 2014-06-17 19:58 人艰不拆_zmc 阅读(199) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdlib.h>char a[1000001];int next[1000001];int l;void Getnext(){ int j=-1; int i=0; next[0]=-1;//忘写了,死循 阅读全文
posted @ 2014-06-17 18:58 人艰不拆_zmc 阅读(189) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>#include <stdlib.h>char a[1000001],b[1000001];int next[1000001];int l,l2;void Getnext(){ int i=0; int j=-1; next[ 阅读全文
posted @ 2014-06-17 18:37 人艰不拆_zmc 阅读(321) 评论(0) 推荐(0) 编辑