結果
問題 | No.2030 Googol Strings |
ユーザー |
|
提出日時 | 2022-07-03 00:51:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 603 bytes |
コンパイル時間 | 3,813 ms |
コンパイル使用メモリ | 230,844 KB |
実行使用メモリ | 10,008 KB |
最終ジャッジ日時 | 2024-12-17 15:06:30 |
合計ジャッジ時間 | 5,223 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 16 |
ソースコード
#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; }