麻烦看一下 这是最长公共子序列 数组z的问题啊
Var
i,j,k,m,n:Longint;
a,b,c:String;
f:Array[0..10000,0..1000]Of Longint;
z:Array[0..10000,0..10000]Of String;
Begin
Readln(a);
Readln(b);
m:=Length(a);
n:=Length(b);
For i:=1 To m Do
For j:=1 To n Do
If a[i]=b[j] Then
Begin
f[i,j]:=f[i-1,j-1]+1;
z[i,j]:=z[i-1,j-1]+a[i];
End
Else
If f[i-1,j]>f[j-1,i]Then
Begin
z[i,j]:=z[i-1,j];
f[i,j]:=f[i-1,j];
End
Else
Begin
z[i,j]:=z[i,j-1];
f[i,j]:=f[i,j-1];
End;
Writeln(z[m,n]);
Write(f[m,n]);
End.