結果

問題 No.201 yukicoderじゃんけん
ユーザー Yang33Yang33
提出日時 2016-01-04 17:42:06
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 574 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 56,476 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 15:04:34
合計ジャッジ時間 1,259 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<string.h>
using namespace std;
int main(void)
{
	int i, j, len1, len2;
	char name1[100], name2[100], te1[1], te2[1];
	char p1[10000], p2[10000];

	cin >> name1 >> p1 >> te1;
	cin >> name2 >> p2 >> te2;

	len1 = strlen(p1);
	len2 = strlen(p2);
	if (len1 > len2)cout << name1;
	else if (len1 < len2)cout << name2;
	else {
		for (i = 0; i < len1; i++) {
			if (p1[i] > p2[i]) {
				cout << name1 << endl;
				break;
			}
			else if (p1[i] < p2[i]) {
				cout << name2 << endl;
				break;
			}
		}
	if(p1[i]==p2[i])cout << -1<<endl;

	}

	return 0;
}
0