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 SSLczh at 2011-07-05 08:55:44 on Problem 3036
const
  dx:array[1..6] of longint=(-1,1,-1,1,0,0);
  dy:array[1..6] of longint=(-1,1,0,0,1,-1);
var
  f:array[0..30,0..30,0..15] of longint;
  t,n,i,j,k,l,i1:longint;
begin
  readln(t);
  for i1:=1 to t do
  begin
    readln(n);
    fillchar(f,sizeof(f),0);
    f[15,15,0]:=1;
    for k:=1 to n do
      for i:=1 to 15 do
       for j:=1 to 15 do
        for l:=1 to 6 do
         f[i,j,k]:=f[i,j,k]+f[i+dx[l],j+dy[l],k-1];
        writeln(f[15,15,n]);
  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