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 |
Re:runtime error请高人指点(代码)In Reply To:runtime error请高人指点(代码) Posted by:CULT at 2006-02-03 17:51:33 > #include<stdio.h> > #include<iostream> > > using namespace std; > > int main() > { > _int64 steps[34][34]; > int i,j, > board[34][34], > n; > > while(cin >> n && n!=-1) > { > > for(i=0;i<n;i++) > { > for(j=0;j<n;j++) > { > cin>>board[i][j]; > steps[i][j]=0; > } > } > > steps[0][0]=1; > > for(i=0;i<n;i++) > { > for(j=0;j<n;j++) > { > if(steps[i][j]!=0&&board[i][j]!=0) > { > if(i+board[i][j]<n) > steps[i+board[i][j]][j]+=steps[i][j]; > if(j+board[i][j]<n) > steps[i][j+board[i][j]]+=steps[i][j]; > } > > } > } > > printf("%I64d\n",steps[n-1][n-1]); > > } > > return 0; > > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator