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

关于_int64位用c提交出现complier error

Posted by 30018347 at 2009-02-24 23:10:53 on Problem 2704
为什么_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:
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