結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
|
提出日時 | 2025-09-13 22:51:01 |
言語 | C# (.NET 8.0.404) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,203 bytes |
コンパイル時間 | 7,600 ms |
コンパイル使用メモリ | 170,460 KB |
実行使用メモリ | 190,492 KB |
最終ジャッジ日時 | 2025-09-13 22:51:16 |
合計ジャッジ時間 | 10,659 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 17 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (97 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); static string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (h, w) = (c[0], c[1]); var s = SList(h); var ans = new char[h][]; var l = "yiwiy9"; var r = "9yiwiy"; for (var i = 0; i < h; ++i) { ans[i] = s[i].ToCharArray(); for (var j = 0; j + 6 <= w; ++j) { var flg = true; for (var b = 0; b < 6; ++b) if (ans[i][j + b] != l[b]) flg = false; if (flg) ans[i][j + 4] = 'Y'; flg = true; for (var b = 0; b < 6; ++b) if (ans[i][j + b] != r[b]) flg = false; if (flg) ans[i][j + 1] = 'Y'; } } WriteLine(string.Join("\n", ans.Select(ai => string.Concat(ai)))); } }