| ||||||||||
| 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:没错。。。。。有很多空格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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator