Do not spend all your time on training or studying - this way you will probably become very exhausted and unwilling to compete more. Whatever you do - have fun. Once you find programming is no fun anymore – drop it. Play soccer, find a girlfriend, study something not related to programming, just live a life - programming contests are only programming contests, and nothing more. Don't let them become your life - for your life is much more interesting and colorful. --Petr
\n
摘要:
这也是一道例题给定一个字符串,求至少出现 k 次的最长重复子串,这 k 个子串可以重叠。算法分析:这题的做法和上一题差不多,也是先二分答案,然后将后缀分成若干组。不同的是,这里要判断的是有没有一个组的后缀个数不小于 k。如果有,那么存在k 个相同的子串满足条件,否则不存在。这个做法的时间复杂度为 O... 阅读全文
posted @ 2015-01-26 11:12
Jeremy Wu
阅读(524)评论(0)推荐(0)