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

fflush库函数的应用,导致WrongAnswer。。系统的漏洞吗?

Posted by hongyu224_li at 2014-02-17 12:29:07 on Problem 1003
因为要循环输入,所以加入fflush函数:
    	for (i = 0; i < N; i++)
	{
	    fflush(stdin);
	    scanf("%f", &arrays[i]);
	}
结果,编译报出Wrong Answer问题,竟然想不到注释fflsuh语句之后,问题消失。

fflush是标准库函数,为什么加入后系统却判为Wrong。这是系统的漏洞吗?

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