蒟蒻求助!!全红!!悬关!!
查看原帖
蒟蒻求助!!全红!!悬关!!
1103607
weirdo_shao楼主2024/5/15 13:51
#include<bits/stdc++.h>
using namespace std;
int main()
{
	
	int n;
	string a,b;
	cin>>n;
	for (int i=0;i<n;i++)
	{
		cin>>a>>b;
		if (a[0]=='R')
		{
			if (b[0]=='R')
			{
				cout<<"Tie"<<endl;
			}
			else
			{
				if (b[0]=='P')
				{
					cout<<"Pleyer2"<<endl;
				}
				else
				{
					cout<<"pleyer1"<<endl; 
				}
			}
			
		}
		if (a[0]=='P')
		{
			if (b[0]=='R')
			{
				cout<<"Pleyer1"<<endl;
			}
			else
			{
				if (b[0]=='P')
				{
					cout<<"Tie"<<endl;
				}
				else
				{
					cout<<"pleyer2"<<endl; 
				}
			}
			
		}
		if (a[0]=='S')
		{
			if (b[0]=='R')
			{
				cout<<"Pleyer2"<<endl;
			}
			else
			{
				if (b[0]=='P')
				{
					cout<<"Pleyer1"<<endl;
				}
				else
				{
					cout<<"Tie"<<endl; 
				}
			}	
		}
	}
	return 0;
}
2024/5/15 13:51
加载中...