結果

問題 No.201 yukicoderじゃんけん
ユーザー agatan
提出日時 2015-05-04 13:36:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 587 bytes
コンパイル時間 462 ms
コンパイル使用メモリ 65,124 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 18:53:12
合計ジャッジ時間 1,125 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <algorithm>

#define REP(i,n) for(int i;i<(n);i++)

using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    string a, ap, b, bp, g;
    cin >> a >> ap >> g >> b >> bp >> g;
    if (ap.length() > bp.length())
        cout << a;
    else if (ap.length() < bp.length())
        cout << b;
    else {
        if (ap > bp)
            cout << a;
        else if (ap < bp)
            cout << b;
        else
            cout << -1;
    }
    cout << endl;

    return 0;
}
0