HDU 1080 - Humen Gene Functions
Problem : Given the matching map. Find the maximum valued matching sum for the given two string.
Solution : Let f[i][j] to be the maximum valued matching sum of a[1..i] and b[1..j]. then f[i][j]=max(f[i-1][j]+match(a[i], '-'), f[i][j-1]+match(b[j], '-'), f[i-1][j-1]+match(a[i], b[j])).