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

while(scanf("%s",str)!=EOF)会是WA而while(cin>>str)就AC

Posted by zentropy at 2008-02-28 17:04:59 on Problem 1496 and last updated at 2008-02-28 17:22:35
WA了好几次
后来想是不是因为scanf的时候ctrl-z要两次的问题,就改成cin,然后就AC了,郁闷

(1)scanf的这种形式在POJ上不能用的么?应该其他地方也是这么用的,好像没问题
(2)为什么我在VC++6.0下,scanf要两次ctrl-z,而cin只要一次?

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