結果
問題 | No.2030 Googol Strings |
ユーザー | Shirotsume |
提出日時 | 2022-07-03 00:51:15 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 603 bytes |
コンパイル時間 | 4,246 ms |
コンパイル使用メモリ | 229,704 KB |
実行使用メモリ | 10,136 KB |
最終ジャッジ日時 | 2024-05-09 21:15:56 |
合計ジャッジ時間 | 5,418 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 43 ms
5,248 KB |
testcase_01 | AC | 21 ms
5,376 KB |
testcase_02 | AC | 18 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
testcase_04 | AC | 38 ms
5,376 KB |
testcase_05 | AC | 17 ms
5,376 KB |
testcase_06 | AC | 39 ms
8,264 KB |
testcase_07 | AC | 50 ms
10,136 KB |
testcase_08 | AC | 50 ms
10,132 KB |
testcase_09 | AC | 23 ms
5,376 KB |
testcase_10 | AC | 23 ms
5,376 KB |
testcase_11 | AC | 23 ms
5,376 KB |
testcase_12 | AC | 43 ms
5,376 KB |
testcase_13 | AC | 36 ms
5,376 KB |
testcase_14 | AC | 23 ms
5,376 KB |
testcase_15 | AC | 40 ms
5,376 KB |
testcase_16 | AC | 45 ms
5,376 KB |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using mint = modint998244353; using ll = long long; #define all(x) x.begin(), x.end() #define rep(i, n) for (int i = 0; i < n; i++) void solve(void){ string x, y; cin >> x >> y; if(x + y > y + x){ cout << 'X' << endl; } else if(x + y < y + x){ cout << 'Y' << endl; } else if(x.length() > y.length()){ cout << 'X' << endl; } else cout << 'Y' << endl; } int main(void) { int t; cin >> t; rep(i, t){ solve(); } return 0; }