-
Notifications
You must be signed in to change notification settings - Fork 0
/
uri 1873.c
36 lines (34 loc) · 1018 Bytes
/
uri 1873.c
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
#include <bits/stdc++.h>
#define D(x) cout << #x " = " << (x) << endl
#define endl '\n'
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
unordered_map<string, vector<string>> ans;
ans["tesoura"].emplace_back("papel");
ans["tesoura"].emplace_back("lagarto");
ans["papel"].emplace_back("pedra");
ans["papel"].emplace_back("spock");
ans["pedra"].emplace_back("lagarto");
ans["pedra"].emplace_back("tesoura");
ans["lagarto"].emplace_back("spock");
ans["lagarto"].emplace_back("papel");
ans["spock"].emplace_back("tesoura");
ans["spock"].emplace_back("pedra");
int c;
cin >> c;
while (c--)
{
string a, b;
cin >> a >> b;
if (ans[a][0] == b || ans[a][1] == b)
cout << "rajesh" << endl;
else if (ans[b][0] == a || ans[b][1] == a)
cout << "sheldon" << endl;
else
cout << "empate" << endl;
}
return 0;
}