結果
| 問題 | No.2030 Googol Strings |
| コンテスト | |
| ユーザー |
kokatsu
|
| 提出日時 | 2023-01-25 20:23:57 |
| 言語 | D (dmd 2.112.0) |
| 結果 |
AC
|
| 実行時間 | 51 ms / 2,000 ms |
| + 345µs | |
| コード長 | 418 bytes |
| 記録 | |
| コンパイル時間 | 1,081 ms |
| コンパイル使用メモリ | 187,904 KB |
| 実行使用メモリ | 8,960 KB |
| 最終ジャッジ日時 | 2026-07-27 07:02:03 |
| 合計ジャッジ時間 | 2,920 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
import std;
void main() {
int T;
readf("%d\n", T);
string f(string x, string y) {
string u = x ~ y, v = y ~ x;
if (u > v) return "X";
else if (u < v) return "Y";
auto a = x.length, b = y.length;
if (a > b) return "X";
else return "Y";
}
foreach (_; 0 .. T) {
string x, y;
readf("%s\n%s\n", x, y);
f(x, y).writeln;
}
}
kokatsu