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 |
此题只要明确一点就可以,所有的insert操作都可以用等量的delete代替将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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator