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

见内,偶把偶2次的输入搞混了...注释掉的是用gets的...汗

Posted by mixter at 2005-08-31 16:53:10 on Problem 2503
In Reply To:Re:....哦哦哦,说错了....最后我用的cin...gets()的我是在中间去空格的~不好意思~ Posted by:mixter at 2005-08-31 16:42:09
while(1){
		scanf("%s",&s);
		char c=getchar();
		
		if(c!=' ')
			break;
		scanf("%s",&p);
		/*gets(s);
		//gets(p);
		
		//puts(p);
		if(s[0]==0)
			break;
		else
		{
			for(int i=0;s[i]!=' ';++i);
			s[i]=0;
			i++;
			for(int j=0;s[i]!=0;++i,++j){
				p[j]=s[i];
			}
			p[j]=0;
		}
		//puts(s);*/
		t.insert(p,s);
	}
	while(1){
		//cout<<s<<endl;
		t.trie_search(s);
		   /*if (t.trie_search(s, entry))
			 printf("%s\n",entry);
		   else 
			  printf("eh\n");*/
		   if(scanf("%s",&s)==EOF)
			   break;
	}

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