20分求助
查看原帖
20分求助
741120
_O__o_楼主2022/10/2 20:34
#include<bits/stdc++.h>

using namespace std;

int main() {
	int i;
	cin >> i;
	string p1,p2;
	for(int j;j<i;j++){
		cin >> p1 >> p2;
		if(p1[0] == p2[0]) cout << "Tie" << endl;
		else if(p1[0]=='S'&&p2[0]=='P') cout <<"player1" << endl;
		else if(p2[0]=='S'&&p1[0]=='P') cout <<"Player2" << endl;
		else if(p1[0] > p2[0]) cout << "Player2" << endl;
		else cout << "Player1" << endl;
	}



	return 0;
}


2022/10/2 20:34
加载中...