結果

問題 No.201 yukicoderじゃんけん
ユーザー zaichuzaichu
提出日時 2015-12-18 02:49:06
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 507 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 62,792 KB
実行使用メモリ 4,480 KB
最終ジャッジ日時 2023-10-14 13:41:56
合計ジャッジ時間 1,384 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 2 ms
4,356 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,356 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,352 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,348 KB
testcase_10 AC 2 ms
4,352 KB
testcase_11 AC 2 ms
4,352 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 1 ms
4,348 KB
testcase_14 AC 1 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 2 ms
4,372 KB
testcase_19 AC 2 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

int main(){
	string a,b,c,d;
	string pa,pb;
	cin >> a >> pa >> c;
	cin >> b >> pb >> d;
	if( pa == pb ){
		cout << -1 << endl;
		return 0;
	}
	if( pa.size() == pb.size()){
		for(int i = 0; i < pa.size(); i++){
			if(pa[i] == pb[i]) continue;
			if(pa[i] > pb[i]) cout << a << endl;
			else cout << b << endl;
		}
	}
	else if( pa.size() > pb.size() ) cout << a << endl;
	else cout << b << endl;
	return 0;
}	
0