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

这都是些什么测试数据,格式和题目定义的不一样啊……WA、WA、WA

Posted by lcsky at 2014-01-27 20:19:39 on Problem 1276
C++ getline就WA,而且都不知道怎么死的,结尾难道不是一空行么,这样有啥问题?或者,不是判断数据结尾时导致的WA?那是神马情况会让这几行简单的代码的行为产生与题目所定义之格式不同于预期的情况?……
	while(getline(cin, line) && line.length() > 0)
	{
		stringstream is(line);
		is >> cash >> m;
	}

scanf就能过:
	while(scanf("%d %d", &cash, &m) != 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