結果

問題 No.201 yukicoderじゃんけん
ユーザー 西尾西尾
提出日時 2018-03-14 12:08:28
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 592 bytes
コンパイル時間 1,480 ms
コンパイル使用メモリ 163,652 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-08-18 05:34:13
合計ジャッジ時間 2,402 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
int i;
int iLenA;
int iLenB;
char lpNameA[ 110 ];
char lpNameB[ 110 ];
char S[ 110 ];
char A[ 10100 ];
char B[ 10100 ];

	cin >> lpNameA;
	cin >> A;
	cin >> S;
	cin >> lpNameB;
	cin >> B;

	iLenA = strlen( A );
	iLenB = strlen( B );
	do
	{
		if( iLenA > iLenB )
			cout << lpNameA << endl;
		else if( iLenA < iLenB )
			cout << lpNameB << endl;
		else
			break;
	}
	while( false );

	i = strcmp( A, B );
	if( i > 0 )
		cout << lpNameA << endl;
	else if( i < 0 )
		cout << lpNameB << endl;
	else
		cout << - 1 << endl;

	return 0;
}
0