-
Notifications
You must be signed in to change notification settings - Fork 0
/
1828.c
56 lines (56 loc) · 1.58 KB
/
1828.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include<stdio.h>
#include<string.h>
int main(){
int t;
scanf("%d",&t);
for(int i=1;i<=t;i++){
char s1[20],s2[20];
scanf("%s %s",&s1,&s2);
int flag=0;
if(strcmp(s1,s2)!=0){
if(strcmp(s1,"tesoura")==0 && strcmp(s2,"papel")==0){
flag=1;
}
else if(strcmp(s1,"tesoura")==0 && strcmp(s2,"lagarto")==0){
flag=1;
}
else if(strcmp(s1,"papel")==0 && strcmp(s2,"pedra")==0){
flag=1;
}
else if(strcmp(s1,"papel")==0 && strcmp(s2,"Spock")==0){
flag=1;
}
else if(strcmp(s1,"pedra")==0 && strcmp(s2,"tesoura")==0){
flag=1;
}
else if(strcmp(s1,"pedra")==0 && strcmp(s2,"lagarto")==0){
flag=1;
}
else if(strcmp(s1,"lagarto")==0 && strcmp(s2,"Spock")==0){
flag=1;
}
else if(strcmp(s1,"lagarto")==0 && strcmp(s2,"papel")==0){
flag=1;
}
else if(strcmp(s1,"Spock")==0 && strcmp(s2,"tesoura")==0){
flag=1;
}
else if(strcmp(s1,"Spock")==0 && strcmp(s2,"pedra")==0){
flag=1;
}
else{
flag=2;
}
}
if(flag==1){
printf("Caso #%d: Bazinga!\n",i);
}
else if(flag==2){
printf("Caso #%d: Raj trapaceou!\n",i);
}
else{
printf("Caso #%d: De novo!\n",i);
}
}
return 0;
}