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

Re:没错。。。。。有很多空格

Posted by hanjialong at 2008-07-30 11:39:01 on Problem 3026
In Reply To:没错。。。。。有很多空格 Posted by:hanjialong at 2008-07-30 11:37:13
hanjialong 3026 Accepted 1304K 16MS C++ 2010B 2008-07-30 11:35:43 
3783529 hanjialong 3026 Wrong Answer   C++ 2016B 2008-07-30 11:34:50 
3783321 hanjialong 3026 Wrong Answer   C++ 2033B 2008-07-30 11:17:13 
3783248 hanjialong 3026 Wrong Answer   C++ 2033B 2008-07-30 11:10:35 
3783188 hanjialong 3026 Wrong Answer   C++ 2012B 
————————————————————惨痛的教训。。。。。
一直改到这样了才AC。。。。。
scanf("%d",&n);
	while(n--)
	{
		k=0;
		scanf("%d%d",&x,&y);gets(c);
		for(i=0;i<y;i++)
		{
			gets(c);
			for(j=0;j<x;j++)
			{
				if(c[j]==' ') map[i][j]=-1;
				else if(c[j]=='#') map[i][j]=-2;
				else
				{
					map[i][j]=k;
					pp[k].x=i;pp[k].y=j;
					k++;
				}
			}
		}
		for(i=0;i<k;i++)
			floodfill(i);
		printf("%d\n",prim(k));
	}

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