Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这样怎么错了?。。

Posted by zhihuikaicheng at 2011-02-08 17:58:03 on Problem 1664
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator