水题,画个图推一下低维的就什么都明白了
从低维类推高维
var f:array[..,..] of int64;
n,m,j,i:longint; begin
readln(m,n);
for i:= to n do
f[i,]:=;
for i:= to m do
f[,i]:=*i;
for i:= to n do
for j:= to m do
f[i,j]:=f[i,j-]+f[i-,j-];
writeln(f[n,m]);
end.
水题,画个图推一下低维的就什么都明白了
从低维类推高维
var f:array[..,..] of int64;
n,m,j,i:longint; begin
readln(m,n);
for i:= to n do
f[i,]:=;
for i:= to m do
f[,i]:=*i;
for i:= to n do
for j:= to m do
f[i,j]:=f[i,j-]+f[i-,j-];
writeln(f[n,m]);
end.