题意: 输入俩个字符串,怎样变换使其所有字符对和最大.(字符只有'A','C','G','T','-') 其中每对字符对应的值如下: 怎样配使和最大呢. 比如: A G T G A T G - G T T A - G 和为 (-3)+5+5+(-2)+5+(-1) +5=14. 题解: 最长公共子序列的变形. 设dp[i][j]为a的前i个和b的前j个字符能构成的最大和. score[][]为每对字符的值,比如score['A']['G']为'A','G'这对字符对应的值. string a…
Palindrome Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 56273 Accepted: 19455 Description A palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a…
Human Gene Functions Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 17805 Accepted: 9917 Description It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four…