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(stdin)就WA,换个输入方式就AC,不明所以

Posted by Magic347 at 2010-11-13 08:55:43 on Problem 1703
//WA
	while( nTest-- ){
	
		scanf("%d %d",&n,&m);
		fflush(stdin);
		initiSet();

		for( i=0 ; i<m ; i++ ){
			scanf("%c %d %d",&ch,&x,&y);
			fflush(stdin);
			query( ch , x , y );		
			
		}
	
	}
//AC
        while( nTest-- ){
	
		scanf("%d %d",&n,&m);
		initiSet();

		for( i=0 ; i<m ; i++ ){
			scanf("\n%c %d %d",&ch,&x,&y);
			query( ch , x , y );		
			
		}
	
	}

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