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 |
关于_int64位用c提交出现complier error为什么_int64,我用c,但是老说我complier error。我自己机子上都通过了。。后来疯掉了,G++,C++,C全都提交了一次,全是complier error。望各位大牛指点下 #include<stdio.h> int map[50][50];//地图 int n; _int64 step[50][50];//记录步数 void InitMap() { int i,j; char tempchar; for(i=0;i<n;i++) for(j=0;j<n;j++) { scanf("%c",&tempchar);// cin>>tempchar; if(tempchar=='\n') scanf("%c",&tempchar); map[i][j]=tempchar-48; step[i][j]=0; } return ; } void FindSolution()//当前所在的方格 { int i,j; step[0][0]=1; for(i=0;i<n;i++) for(j=0;j<n;j++) if(step[i][j]) if(i!=n-1||j!=n-1) { if(j+map[i][j]<n)//可以往右走 step[i][j+map[i][j]]+=step[i][j]; if(i+map[i][j]<n)//可以往下走 step[i+map[i][j]][j]+=step[i][j]; } return ; } void main() { int i,j; while(1) { scanf("%d",&n); if(n==-1)return ; InitMap(); FindSolution(); printf("%I64d\n",step[n-1][n-1]); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator