Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
127232 柯昊阳 神族文字 C++ 通过 100 662 MS 16644 KB 424 2024-01-25 08:27:07

Tests(10/10):


#include <bits/stdc++.h> using namespace std; map<string,string> mp; int main(){ string s; string a,b; while(getline(cin,s)&&s!=""){ b = ""; a = ""; int i; for(i = 0;s[i]!=' '&&i<=s.size();i++){ a+=s[i]; } for(int j = i+1;j<s.size();j++){ b+=s[j]; } mp[b] = a; } while(cin>>a){ if(mp[a]!=""){ cout<<mp[a]<<endl; } else { cout<<"eh"<<endl; } } return 0; }


测评信息: