Files
python/TangDou/XiTi/1095.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

37 lines
929 B
C++

#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;
}