結果
| 問題 |
No.3234 Infinite Propagation
|
| コンテスト | |
| ユーザー |
ジュ・ビオレ・グレイス
|
| 提出日時 | 2025-08-15 22:08:16 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 689 bytes |
| コンパイル時間 | 637 ms |
| コンパイル使用メモリ | 90,488 KB |
| 実行使用メモリ | 21,180 KB |
| 最終ジャッジ日時 | 2025-08-15 22:08:19 |
| 合計ジャッジ時間 | 1,725 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 18 |
コンパイルメッセージ
Main.d(22): Warning: else is dangling, add { } after condition at Main.d(17)
ソースコード
import std.stdio, std.algorithm, std.array, std.conv, std.typecons;
void main() {
string[] anss;
auto T = readln[0 .. $-1].to!uint;
test:
foreach (t; 0 .. T) {
auto N = readln[0 .. $-1].to!uint;
string[][] XYs;
foreach (n; 0 .. N) {
XYs ~= readln.split;
}
ulong bbb_lens_max;
foreach (XY; XYs) {
if (XY[0] == "a")
if (XY[1].count("a") != 0) {
anss ~= "Yes";
continue test;
}
else
bbb_lens_max = max(bbb_lens_max, XY[1].length);
}
foreach (XY; XYs) {
if (XY[0].count("a") == 0 && XY[0].length <= bbb_lens_max) {
anss ~= "Yes";
continue test;
}
}
anss ~= "No";
}
foreach (ans; anss) writeln(ans);
}
ジュ・ビオレ・グレイス