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

为什么这里用cin,cout可以AC,而用scanf,printf会TLE????

Posted by KosonLau at 2007-12-13 02:04:10 on Problem 1274
二分匹配代码略..
.....
....
....
...

int main(){
	
	//while(scanf("%d%d",&u,&v)){
	while(cin>>u>>v){
		int k,t;
		int i=0;
		memset(c,false,sizeof(c));
		while(i<u){
			//scanf("%d",&k);
			cin>>k;
			while(k-->0){
				//scanf("%d",&t);
				cin>>t;
				c[i][t-1]=true;
			}
			i++;
		}
		//printf("%d\n",Match());
		cout<<Match()<<endl;
	}
	return 1;
}

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