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

如果非要用getchar的话,该怎么用。。我的

Posted by yayu_myself at 2009-12-31 20:15:15 on Problem 1251 and last updated at 2009-12-31 20:16:00
In Reply To:一个cin引发的血案 Posted by:xujiaming at 2008-10-27 22:52:28
我是这样的。。结果不行。

for (i = 0; i < n - 1; i++)
{
	getchar();
	scanf("%c%d", &vi, &m);
	while (m--)
	{
		scanf(" %c%d", &vj, &cost);
		map[vi -'A'][vj - 'A'] = cost;
		map[vj -'A'][vi - 'A'] = cost;
	}
}

但是自己写文件测试可以呃。。

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