結果

問題 No.2030 Googol Strings
ユーザー t98slidert98slider
提出日時 2022-08-06 12:03:46
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 1,517 ms
コンパイル使用メモリ 167,236 KB
実行使用メモリ 9,848 KB
最終ジャッジ日時 2023-10-14 13:39:26
合計ジャッジ時間 3,080 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
4,352 KB
testcase_01 AC 16 ms
4,348 KB
testcase_02 AC 13 ms
4,352 KB
testcase_03 AC 1 ms
4,372 KB
testcase_04 AC 30 ms
4,352 KB
testcase_05 AC 13 ms
4,348 KB
testcase_06 AC 28 ms
8,976 KB
testcase_07 AC 36 ms
9,832 KB
testcase_08 AC 36 ms
9,848 KB
testcase_09 AC 16 ms
4,348 KB
testcase_10 AC 16 ms
4,352 KB
testcase_11 AC 17 ms
4,348 KB
testcase_12 AC 33 ms
4,352 KB
testcase_13 AC 26 ms
4,372 KB
testcase_14 AC 17 ms
4,352 KB
testcase_15 AC 28 ms
4,348 KB
testcase_16 AC 36 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
    int Q;
    cin >> Q;
    while(Q--){
        string s, t, u, v;
        cin >> s >> t;
        u = s + t;
        v = t + s;
        if(u != v){
            cout << (u > v ? 'X' : 'Y') << '\n';
        }else{
            cout << (s.size() > t.size() ? 'X' : 'Y') << '\n';
        }
    }
}
0