Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
127176 廖悦扬 神族文字 C++ 通过 100 622 MS 11192 KB 485 2024-01-25 08:10:53

Tests(10/10):


#include <bits/stdc++.h> using namespace std; map<string, string> dict; signed main() { while (true) { string s; getline(cin, s); if (s == "") { break; } int i; for (i=0; i<s.size(); i++) { if (s[i] == ' ') break; } string a, b; a = s.substr(0, i), b = s.substr(i+1, s.size()-i); dict[b] = a; } string s; while (cin >> s) { if (dict.count(s)) { cout << dict[s] << '\n'; } else { cout << "eh\n"; } } return 0; }


测评信息: