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 |
fflush是针对键盘输入的。而OJ是采用文件输入的。In Reply To:fflush库函数的应用,导致WrongAnswer。。系统的漏洞吗? Posted by:hongyu224_li at 2014-02-17 12:29:07 > 因为要循环输入,所以加入fflush函数: > for (i = 0; i < N; i++) > { > fflush(stdin); > scanf("%f", &arrays[i]); > } > 结果,编译报出Wrong Answer问题,竟然想不到注释fflsuh语句之后,问题消失。 > > fflush是标准库函数,为什么加入后系统却判为Wrong。这是系统的漏洞吗? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator