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

但是我那种写法可能会让不知道的人不管读入多少参数都和2来比较,这就适得其反了,现在我两种都写上了

Posted by hawk at 2005-04-05 13:00:16 on Problem 1001
In Reply To:我认为我写的那个更加鲁棒 Posted by:hawk at 2005-04-05 12:56:07
> 数据没问题的时候一样的
> 万一数据有问题,比如结束的时候,多出一点东西,但是又比完整的数据要少
> 这个时候判断eof就不会结束,因为这个时候可能读入了部分数据,scanf的返回值就是成功读入的数据的数目

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