You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
929 B

#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string a[10];
for (int i = 0; i < n; ++i) {
string s1, s2;
cin >> s1 >> s2;
//Rock 石头
//Scissors 剪刀
//Paper 布
if (s1 == s2) {
a[i] = "Tie";
} else if (s1[0] == 'R' && s2[0] == 'S') {
a[i] = "Player1";
} else if (s1[0] == 'R' && s2[0] == 'P') {
a[i] = "Player2";
} else if (s1[0] == 'S' && s2[0] == 'R') {
a[i] = "Player2";
} else if (s1[0] == 'S' && s2[0] == 'P') {
a[i] = "Player1";
} else if (s1[0] == 'P' && s2[0] == 'R') {
a[i] = "Player1";
} else if (s1[0] == 'P' && s2[0] == 'S') {
a[i] = "Player2";
}
}
for (int i = 0; i < n; ++i) {
cout << a[i] << endl;
}
return 0;
}