dp,但是要顺推容易点 const mm=; var f:..,..,..,..]of longint; n,m,kk,now,sum,i,j,k1,k2:longint; function max(x,y:longint):longint; begin if x<y then exit(y); exit(x); end; begin readln(n,m,kk); now:=; f[now][,,]:=; f[now][,,]:=; do begin fillchar(f[-now],size…