Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
127469 | 梁思宸 | 神族文字 | C++ | 通过 | 100 | 656 MS | 27608 KB | 527 | 2024-01-25 09:12:10 |
#include <bits/stdc++.h> using namespace std; map<string, string> mp; string key[100010], word, haha[100010]; int main (){ ios::sync_with_stdio(false); cin.tie(0); int x = 1; while (true){//cat duolij getline(cin, haha[x]); if (haha[x] == "") break; int p = haha[x].find(' '); key[x] = haha[x].substr(p + 1, haha[x].size() - p - 1); mp[key[x]] = haha[x].substr(0, p); x++; } while (cin >> word){ if (mp[word] == "") cout << "eh" << endl; else cout << mp[word] << endl; } return 0; }