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 alazyrabbit at 2010-12-12 16:43:46 on Problem 2752
In Reply To:必胜客在召唤^_^ Posted by:outstanding at 2006-01-23 22:13:14
"
	while(scanf("%c", &c) != EOF)
	{
		if(c != '\n')
		{
			s += c;
		}
		else
		{	......
"

如果输入数据的最后没有回车那么你的程序就会TLE

正确的写法是:
while(scanf("%s",s)!=EOF){
...
}

必胜客什么时候请啊?

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