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 |
这都是些什么测试数据,格式和题目定义的不一样啊……WA、WA、WAC++ 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator