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 |
为什么用kmp是WA?kmp应该没有错啊,poj 3080的都过了啊/int j = 0 , k = -1 ; next[0] = -1 ; while ( j < (int)strlen(str) ) { if ( k == -1 || str[j] == str[k] ) { j++ ; k++ ; next[j] = k ; } else k = next[k] ; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator