HDU 1516 - String Distance and Transform Process

Problem : Calculating the Editing Distance of 2 string, and given the transform way from s1 to s2.
Solution : Denote f[i][j] to be the edting distance from s1[1..i] to s2[1..j]. Thus f[i][j]=min(f[i][j-1]+1(Insert), f[i-1][j]+1(Delete), f[i-1][j-1]+(s1[i]==s2[j]?0:1); (Replace)). Since transform way is needed, the trace of status transform should be record.