-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1828.cpp
64 lines (61 loc) · 1.75 KB
/
1828.cpp
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <iostream>
using namespace std;
int main()
{
int t;
cin >> t;
int i;
string s, r;
for(i=0; i<t; i++)
{
cin >> s >> r;
if(s==r)
cout <<"Caso #"<<i+1<<": De novo!"<<endl;
else
{
if(s=="tesoura")
{
if(r=="papel" || r=="lagarto")
cout <<"Caso #"<<i+1<<": Bazinga!"<<endl;
else
cout<<"Caso #"<<i+1<<": Raj trapaceou!"<<endl;
}
else if(s=="papel")
{
if(r=="pedra" || r=="Spock")
cout <<"Caso #"<<i+1<<": Bazinga!"<<endl;
else
cout <<"Caso #"<<i+1<<": Raj trapaceou!"<<endl;
}
else if(s=="pedra")
{
if(r=="lagarto" || r=="tesoura")
cout <<"Caso #"<<i+1<<": Bazinga!"<<endl;
else
cout <<"Caso #"<<i+1<<": Raj trapaceou!"<<endl;
}
else if(s=="lagarto")
{
if(r=="Spock" || r=="papel")
cout <<"Caso #"<<i+1<<": Bazinga!"<<endl;
else
cout <<"Caso #"<<i+1<<": Raj trapaceou!"<<endl;
}
else if (s=="Spock")
{
if(r=="tesoura" || r=="pedra")
cout <<"Caso #"<<i+1<<": Bazinga!"<<endl;
else
cout <<"Caso #"<<i+1<<": Raj trapaceou!"<<endl;
}
else if (s=="tesoura")
{
if(r=="lagarto")
cout <<"Caso #"<<i+1<<": Bazinga!"<<endl;
else
cout <<"Caso #"<<i+1<<": Raj trapaceou!"<<endl;
}
}
}
return 0;
}