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:哪位大神告诉我为什么交g++~AC,交C++却WA???!!!

Posted by 549154383 at 2018-09-21 09:45:38 on Problem 2503
In Reply To:哪位大神告诉我为什么交g++~AC,交C++却WA???!!! Posted by:490953931 at 2016-08-05 17:38:17
> /**
> * @Date:   2016-07-21 10-41-21
> * @Project: ACM
> * @Last modified time: 2016-08-05 05-22-30
> */
> 
> #include <cstdio>
> #include <iostream>
> #include <map>
> #include <string>
> using namespace std;
> 
> map<string,string> m;
> 
> int main(){
>     char str[15],a[15],b[15];
>     string s;
>     while(gets(str)&&str[0]!='\0'){
>         sscanf(str,"%s%s",a,b);
>         m[b]=a;
>     }
>     while(cin>>s){
>         if(m[s].size()) cout<<m[s]<<endl;
>         else cout<<"eh"<<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