Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:具体怎么暴力?我的想法In Reply To:具体怎么暴力?我的想法 Posted by:waterine at 2006-11-08 10:31:44 O(n^2)枚举一个串的子串,O(mn^2)去给其他串naive匹配,总共O(mn^4) > 前两个字符串>3的公共子串构造trie tree > 和第3..n串比较,删除不匹配关键字 > 最后取trie中最深叶子 > 这样是O(n^3),有没有可能在O(n^2)?或者同是n^3算法更简单 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator