-
Notifications
You must be signed in to change notification settings - Fork 2
/
1215.txt
50 lines (40 loc) · 1.04 KB
/
1215.txt
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
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int a[1001],i,j,n,m,adam1,adam2;
char x,y;
cin>>n;
for(i=1; i<=n; i++)
{
adam1=0;
adam2=0;
cin>>m;
for(j=1; j<=m; j++)
{
cin>>x;
cin>>y;
if(x=='R' && y=='S')
adam1++;
else if(x=='R' && y=='P')
adam2++;
else if(x=='S' && y=='R')
adam2++;
else if(x=='S' && y=='P')
adam1++;
else if(x=='P' && y=='R')
adam1++;
else if(x=='P' && y=='S')
adam2++;
}
if(adam1>adam2)
cout<<"Player 1"<<endl;
else if(adam2>adam1)
cout<<"Player 2"<<endl;
else if(adam1==adam2)
cout<<"TIE"<<endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}