結果
| 問題 | No.3261 yiwiy9 → yiwiY9 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-06 13:33:59 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 547 bytes |
| 記録 | |
| コンパイル時間 | 4,866 ms |
| コンパイル使用メモリ | 184,656 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-14 19:14:43 |
| 合計ジャッジ時間 | 4,772 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 19 |
ソースコード
use itertools::Itertools;
use proconio::{input, marker::Chars};
fn main() {
input! {
h: usize,
w: usize,
mut s: [Chars; h],
}
for i in 0..h {
for j in 0..w {
if s[i][j] == 'y' {
if j > 0 && s[i][j - 1] == '9' {
s[i][j] = 'Y'
}
if j < w - 1 && s[i][j + 1] == '9' {
s[i][j] = 'Y'
}
}
}
}
println!("{}", s.iter().map(|s_i| s_i.iter().join("")).join("\n"));
}