結果

問題 No.201 yukicoderじゃんけん
ユーザー SDESTINY_kprSDESTINY_kpr
提出日時 2020-03-12 00:15:33
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 589 bytes
コンパイル時間 1,298 ms
コンパイル使用メモリ 167,032 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-27 21:56:12
合計ジャッジ時間 1,923 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define rep(i,n) for(int i=0;i<n;i++)

const ll mod = ll(1e9) + 7;
const int INF = 1<<29;

int main(){
    string sa,sb,pa,pb,xa,xb;
    cin >> sa >> pa >> xa >> sb >> pb >> xb;
    string ans;
    if (pa.size()>pb.size()) ans = sa;
    else if (pa.size()<pb.size()) ans = sb;
    else{
        rep(i,pa.size()){
            if (pa[i]>pb[i]) ans = sa;
            else if (pa[i]<pb[i]) ans = sb;
            if (i==pa.size()-1) ans = "-1";
        }
    }
    cout << ans << endl;
    return 0;
}
0