結果

問題 No.201 yukicoderじゃんけん
ユーザー somo_6
提出日時 2015-05-08 23:20:37
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 461 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 59,224 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 20:34:14
合計ジャッジ時間 1,256 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>

using namespace std;

struct person
{
	string name;
	string yuruhuwa;
	string hand;
};
int main()
{
	person player[2];
	for(auto &p : player)
	{
		cin >> p.name >> p.yuruhuwa >> p.hand;
	}
	if(player[0].yuruhuwa==player[1].yuruhuwa){
		cout << "-1" << endl;
		return 0;
	}
	person win = max(player[0],player[1],
		[](const person& a,const person& b){
			return a.yuruhuwa<b.yuruhuwa;
		}
	);
	cout << win.name << endl;
}
0