結果

問題 No.201 yukicoderじゃんけん
ユーザー fumi6328
提出日時 2018-09-11 23:32:54
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 452 bytes
コンパイル時間 552 ms
コンパイル使用メモリ 56,236 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 10:22:16
合計ジャッジ時間 1,220 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
using namespace std;

//文字列の要素はchar型なのでそのまま比較できる

int main()
{
    string sa,sb,pa,pb,xa,xb;
    cin >> sa >> pa >> xa >> sb >> pb >> xb;

    if(pa == pb) cout << -1 << endl;
    else if(pa.length() > pb.length()) cout << sa << endl;
    else if(pa.length() < pb.length()) cout << sb << endl; 
    else cout << (pa > pa ? sa : sb) << endl;

    return 0;
}
0