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

此题只要明确一点就可以,所有的insert操作都可以用等量的delete代替

Posted by gyarenas at 2012-05-25 22:17:49 on Problem 3356
将insert操作忽略掉后,状态转移方程为

if(str1[i] == str2[j])
				{
					table[i][j] = table[i-1][j-1];
				}
				else
				{
					table[i][j] = min(table[i-1][j-1]+1, min(table[i-1][j]+1, table[i][j-1]+1));
				}

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