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 |
晕啊,真的是啊…分数和名字之间有可能不止一个空格用 sscanf() 分开的话要小心In Reply To:输入数据有多于空格,注意啊 Posted by:forgotaboutdre at 2011-04-19 20:18:01 > ....数据后有多于空格,我了个去,这么水的题花了我这么长时间,结果发现是输入问题。。。。 总之我之前用 sscanf(input,"%d %[]",&x,str); 把分数和名字分开…WA 换成 str = input; while(str[0]!=' ') ++str; while(str[0]==' ') ++str; 就AC了…… Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator