結果
| 問題 |
No.2030 Googol Strings
|
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2022-12-08 02:34:46 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 2,000 ms |
| コード長 | 695 bytes |
| コンパイル時間 | 3,871 ms |
| コンパイル使用メモリ | 140,908 KB |
| 実行使用メモリ | 11,840 KB |
| 最終ジャッジ日時 | 2024-10-14 04:46:39 |
| 合計ジャッジ時間 | 6,139 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
#include <cassert>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <climits>
#include <map>
#include <queue>
#include <set>
#include <cstring>
#include <vector>
using namespace std;
typedef long long ll;
void solver(string x, string y) {
string s1 = x + y;
string s2 = y + x;
if (s1 > s2) {
cout << "X" << endl;
} else if (s1 < s2) {
cout << "Y" << endl;
} else {
if (x.size() > y.size()) {
cout << "X" << endl;
} else {
cout << "Y" << endl;
}
}
}
int main() {
int T;
cin >> T;
for (int i = 0; i < T; ++i) {
string x;
string y;
cin >> x;
cin >> y;
solver(x, y);
}
return 0;
}
siman