Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么用kmp是WA?kmp应该没有错啊,poj 3080的都过了啊/

Posted by wzm at 2009-03-09 20:44:39 on Problem 3450
	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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator