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 3d_fly at 2010-07-31 23:22:10 on Problem 2271
本来这题用scanf逐词读入是很好的,因为这样可以省去对空格或回车的处理~只是如果这样写下去就会发现有很多意想不到的问题~

首先Sample Input并不适合这种方法,所以要自己处理一下输入的数据,把回车都改成空格~

然后在输出的时候分栏线下面会出现空行,別以为是自己错了,其实这是能AC的~反而如果去掉分栏线后的回车的话,看起来是和Sample Output一样了,可是oj上却是PE的~

最后的结束流是要有两个"^Z"的~也不要以为是自己错了~直接提交吧~

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