結果
問題 |
No.2030 Googol Strings
|
ユーザー |
![]() |
提出日時 | 2023-05-13 04:30:33 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 46 ms / 2,000 ms |
コード長 | 576 bytes |
コンパイル時間 | 945 ms |
コンパイル使用メモリ | 107,388 KB |
最終ジャッジ日時 | 2025-02-12 23:50:14 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 16 |
ソースコード
#include <iostream> #include <vector> #include <cmath> #include <map> #include <set> #include <iomanip> #include <queue> #include <algorithm> #include <numeric> #include <deque> #include <complex> #include <cassert> using namespace std; using ll = long long; int main(){ int T; cin >> T; while(T){ T--; string x, y, s, t; cin >> x >> y; s = x+y; t = y+x; if (s > t) cout << "X" << endl; else if (s == t) cout << (x.size() > y.size() ? "X" : "Y") << endl; else cout << "Y" << endl; } return 0; }