結果

問題 No.201 yukicoderじゃんけん
ユーザー r2en_r2en_
提出日時 2017-03-23 21:49:39
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 558 ms
コンパイル使用メモリ 64,916 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-19 06:45:06
合計ジャッジ時間 1,576 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
using namespace std;

string solve(string sa,string sb,string pa,string pb){
    if(pa.size()<pb.size()){ return sb; }
    else if(pa.size()>pb.size()){ return sa; }
    else{ for(int i = 0; i < pa.size(); ++i){ return((pa[i]<pb[i]) ? sb : sa); }}
    return "-1";
}

int main(){
    string sa,sb,pa,pb,xa,xb;
    cin >> sa >> pa >> xa;
    cin >> sb >> pb >> xb;
    cout << solve(sa,sb,pa,pb) << endl;
    return 0;
}
0