2017年3月27日

FLOYD判圈

摘要: 转载一篇博客:http://blog.csdn.net/javasus/article/details/50015687 Floyd判圈算法(Floyd Cycle Detection Algorithm),又称龟兔赛跑算法(Tortoise and Hare Algorithm)。该算法由美国科学 阅读全文

posted @ 2017-03-27 15:00 gryzy 阅读(285) 评论(0) 推荐(0)

2017年3月22日

HDU2222 Keywords Search__AC自动机

摘要: Keywords Search Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %I64d & %I64u Submit Status Description In the modern time, Search engine c 阅读全文

posted @ 2017-03-22 16:15 gryzy 阅读(177) 评论(0) 推荐(0)

2017年3月12日

poj2185Milking Grid

摘要: Milking Grid Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 8325 Accepted: 3588 Description Every morning when they are milked, the Farmer 阅读全文

posted @ 2017-03-12 16:31 gryzy 阅读(297) 评论(0) 推荐(0)

POJ2961_kmp

摘要: Period Time Limit: 3000MS Memory Limit: 30000KB 64bit IO Format: %I64d & %I64u Submit Status Description For each prefix of a given string S with N ch 阅读全文

posted @ 2017-03-12 10:20 gryzy 阅读(216) 评论(0) 推荐(0)

2017年3月10日

POJ 2406

摘要: Power Strings Time Limit: 3000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Submit Status Description Given two strings a and b we define a* 阅读全文

posted @ 2017-03-10 16:28 gryzy 阅读(163) 评论(0) 推荐(0)

2017年3月9日

poj 2752Seek the Name, Seek the Fame

摘要: Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64u Submit Status Description The little cat is so fa 阅读全文

posted @ 2017-03-09 21:09 gryzy 阅读(164) 评论(0) 推荐(0)

cogs 2566 字符串最大值

摘要: 2566. [51nod 1129] 字符串最大值 ★★ 输入文件:string_maxval.in 输出文件:string_maxval.out 简单对比时间限制:1 s 内存限制:256 MB 【题目描述】 一个字符串的前缀是指包含该字符第一个字母的连续子串,例如:abcd的所有前缀为a, ab 阅读全文

posted @ 2017-03-09 08:28 gryzy 阅读(149) 评论(0) 推荐(0)

2017年3月6日

POJ 3461__KMP算法

摘要: 【题目描述】 法国作家乔治·佩雷克(Georges Perec,1936-1982)曾经写过一本书,《敏感字母》(La disparition),全篇没有一个字母‘e’。他是乌力波小组(Oulipo Group)的一员。下面是他书中的一段话: Tout avait Pair normal, mais 阅读全文

posted @ 2017-03-06 20:31 gryzy 阅读(217) 评论(0) 推荐(0)

2017年2月21日

后缀数组之倍增算法

摘要: 首先说明 :后缀数组的构建在网上有多种方法:朴素的n*n*logn,还有倍增n*logn的,还有3*n的DC3算法,当然还有DC算法。这个算法学习自林厚丛老师的《高级数据结构》,代码较长,而且常数也比较大,但是是我这种笨人可以理解的。如有人想学短而快的可以学习《罗穗骞 后缀数组 处理字符串的有力工具 阅读全文

posted @ 2017-02-21 16:03 gryzy 阅读(1526) 评论(0) 推荐(0)

2017年1月6日

HDU1075

摘要: 题目大意: 给你一本火星词典,每个火星单词对应一个英文单词。 然后给你一篇火星文章,要求你翻译成英文。 要求如下: 如果这个火星单词用英文单词可以表示,就翻译成英文,如果没有这个单词,就原样输出。遇到标点符号或者空格原样输出即可。 __________________________________ 阅读全文

posted @ 2017-01-06 15:49 gryzy 阅读(470) 评论(0) 推荐(0)

导航