| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
这样怎么错了?。。program lt;
var t,l,i,j,n,m:longint;
f:array[0..11,0..11]of longint;
begin
readln(t);
for l:=1 to t do
begin
readln(n,m);
for i:=1 to n do
begin
f[i,0]:=1;f[i,1]:=1;
end;
for i:=1 to m do
begin
f[0,i]:=1;f[1,i]:=1;
end;
for i:=1 to n do
for j:=1 to m do
if i<j then
f[i,j]:=f[i,i]
else
f[i,j]:=f[i,j-1]+f[i-j,j];
writeln(f[n,m]);
end;
end.
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator