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 597100700 at 2011-09-12 19:38:07 on Problem 3181
type xx=array[0..100]of longint;
var a,b,c,d,e,m,n:longint;
    f:array[0..1000,0..100]of xx;
procedure mul(var u:xx;v:xx);
var i,j:longint;
begin
if u[0]<v[0] then u[0]:=v[0];
for i:=1 to u[0] do
 begin
 u[i]:=u[i]+v[i];
 if u[i]>9 then
  begin
  u[i]:=u[i]-10;
  u[i+1]:=u[i+1]+1;
  end;
 end;
if u[u[0]+1]>0 then inc(u[0]);
end;
begin
readln(m,n);
for a:=1 to n do
 begin
 f[0,a,0]:=1;
 f[0,a,1]:=1;
 end;
for a:=1 to m do
 for b:=1 to n do
  begin
  mul(f[a,b],f[a,b-1]);
  if a>=b then mul(f[a,b],f[a-b,b]);
  end;
if f[m,n,0]=0 then writeln(0)
else
for a:=f[m,n,0] downto 1 do
if a<>1 then
 write(f[m,n,a])
 else writeln(f[m,n,a]);
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