-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path10282.cpp
More file actions
44 lines (43 loc) · 1009 Bytes
/
10282.cpp
File metadata and controls
44 lines (43 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* ____
* ____ ___ ____ ________ __/ __/
* / __ `__ \/ __ `/ ___/ / / / /_
* / / / / / / /_/ / / / /_/ / __/
* /_/ /_/ /_/\__,_/_/ \__,_/_/
*
* @link : https://the-redback.com
*/
#include <bits/stdc++.h>
using namespace std;
#define inf HUGE_VAL
#define mem(a, b) memset(a, b, sizeof(a))
int main() {
map<string, string> mp;
string s, ss;
char a[100010];
int tc, t = 1, i, j, k, l;
while (gets(a)) {
l = strlen(a);
if (l == 0) break;
i = 0, k = 0;
s = "";
ss = "";
for (i = 0; i < l; i++) {
if (a[i] == ' ') break;
s.push_back(a[i]);
}
i++;
for (; i < l; i++) {
ss.push_back(a[i]);
}
mp[ss] = s;
}
while (gets(a)) {
s.assign(a);
if (mp.find(s) == mp.end())
printf("eh\n");
else
printf("%s\n", mp[s].c_str());
}
return 0;
}