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

发现一个神奇的问题,大家来看一下..

Posted by lijinwudemajia at 2010-05-16 18:29:22 on Problem 1251
VEEGIN同学的处理方式:
		for(i=1;i<n;i++)
		{
			scanf(" %c%d",&p1,&m);
			p1-=64;
			for(j=1;j<=m;j++)
			{
				scanf(" %c%d",&p2,&v);
				p2-=64;
				map[p1][p2]=map[p2][p1]=v;
			}
		}
我一开始的处理方式是
		for(int i=0;i<n-1;++i)
		{
			scanf("%*c%c %d",&p,&num);
			for(int j=0;j<num;++j)
			{
				scanf(" %c %d",&dest,&length);
				node[c].pa=p-'A';
				node[c].pb=dest-'A';
				node[c].len=length;
				++c;
			}
		}
RE了,按我感觉%*c就是对应他上面的空格啊..为什么在这里会有区别呢..

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