摘要:
题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=1711 改进的模式匹配算法--KMP算法,时间复杂度有O(n*m)降到O(n+m),求解next数组之后与常规的模式匹配算法相同。 1 #include 2 const int maxn=100... 阅读全文
posted @ 2014-07-27 20:08
BMESwimming
阅读(149)
评论(0)
推荐(0)
摘要:
题目来源:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1549 并查集,求出每个friends集合,然后再计算每个集合friends个数,求出最... 阅读全文
posted @ 2014-07-27 13:04
BMESwimming
阅读(153)
评论(0)
推荐(0)
浙公网安备 33010602011771号