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

Re:贴个简单耗时的代码

Posted by shun_fzll at 2012-08-21 10:17:32 on Problem 2503
In Reply To:贴个简单耗时的代码 Posted by:shun_fzll at 2012-08-19 11:25:00
> #include<iostream>
> #include<map>
> using namespace std;
> #include<string>
> map<string,string>mp;
> int main()
> {
> 	char a[30],b[15],c[15];
> 	while(gets(a)&&a[0]!='\0')
> 	{
> 		sscanf(a,"%s %s",&b,&c);
> 		mp[c]=b;
> 	}
> 	char s[15];
> 	while(gets(s)&&s[0]!='\0')
> 	{
> 		if(mp[s][0]=='\0')cout<<"eh\n";
> 		else cout<<mp[s]<<endl;
> 	}
> 	return 0;
> 
> }
好水啊

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