摘要:
http://poj.org/problem?id=3080不多说与poj3450 差不多,都是求几个字符串拥有的相同子串,并是最长的。不过这题要求子串长度不低于3,还有各个提供的字符串长度也都相等。所以是把做过的poj3450稍微改下,很给力0ms通过。Source CodeProblem: 3080User: 541780774Memory: 708KTime: 0MSLanguage: G++Result: AcceptedSource Code#include <stdio.h>#include <stdlib.h>#include<string.h> 阅读全文
posted @ 2011-02-28 14:20
CoderZhuang
阅读(141)
评论(0)
推荐(0)
摘要:
http://poj.org/problem?id=3450给数个字符串,若这些字符串中拥有相同的子串,求最大长度的子串,长度相等取ASCII码小的。这题也是可以用KMP算法来解,用一个字符串枚举去匹配其它的串,找到一个最长的就可以了。当然时间要用得长一些了。Source CodeProblem: 3450User: 541780774Memory: 920KTime: 282MSLanguage: G++Result: AcceptedSource Code#include <stdio.h>#include <stdlib.h>#include<string. 阅读全文
posted @ 2011-02-28 13:47
CoderZhuang
阅读(167)
评论(0)
推荐(0)

浙公网安备 33010602011771号