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:cssdnx at 2011-07-30 16:48:31 跟LCS很像,根据LCS的思路考虑, f[i][j]表示,a的前i个基因序列和b的前j个基因序列需要的最少操作数 则: f[i][j] = min { 若 a[i] == b[j] f[i][j] = f[i-1][j-1]; 若 不等: 插入:f[i][j] = f[i][j-1] + 1; 删除: f[i][j] = f[i-1][j] + 1; 替换:f[i][j] = f[i-1][j-1] + 1; } 注意初值: f[0][0] = 0; f[i][0] = i; f[0][i] = i; Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator