結果
| 問題 | 
                            No.201 yukicoderじゃんけん
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-03-11 16:00:08 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 769 bytes | 
| コンパイル時間 | 422 ms | 
| コンパイル使用メモリ | 56,900 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-06-23 15:33:01 | 
| 合計ジャッジ時間 | 1,174 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 10 WA * 10 | 
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string name[2];
	int yp[2];
	char h[2];
	for (int i = 0; i < 2; i++)
	{
		cin >> name[i] >> yp[i] >> h[i];
	}
	if ((h[0] == 'R' && h[1] == 'P') || (h[0] == 'C' && h[1] == 'R') || (h[0] == 'P' && h[1] == 'C'))
	{
		if (yp[0] > yp[1])
		{
			cout << name[0] << endl;
		}
		else cout << name[1] << endl;
	}
	else if ((h[0] == 'R' && h[1] == 'C') || (h[0] == 'C' && h[1] == 'P') || (h[0] == 'P' && h[1] == 'R'))
	{
		if (yp[0] < yp[1])
		{
			cout << name[1] << endl;
		}
		else cout << name[0] << endl;
	}
	else
	{
		if (yp[0] < yp[1])
		{
			cout << name[1] << endl;
		}
		else if (yp[0] > yp[1])
		{
			cout << name[0] << endl;
		}
		else
		{
			cout << "-1" << endl;
		}
	}
	return 0;
}