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

你这样当然不对啦。因为%s是字符串,用char s[10];scanf("%s",s); 取s[0]保证不会错。

Posted by yygy at 2014-07-21 14:16:49 on Problem 1988
In Reply To:坑!!用scanf("%s",&s); 在c++ 是wa,用g++ 是Accept! Posted by:black_snow at 2014-07-21 12:36:21
> char s;
> scanf("%s",&s);
> 用这种方法省去回车键带来的影响,用C++ 交是wa, 用G++ 是AC 

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