結果
| 問題 |
No.3261 yiwiy9 → yiwiY9
|
| コンテスト | |
| ユーザー |
lp_ql
|
| 提出日時 | 2025-09-06 13:31:00 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 666 bytes |
| コンパイル時間 | 14,791 ms |
| コンパイル使用メモリ | 386,052 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-09-06 13:31:18 |
| 合計ジャッジ時間 | 15,259 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
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).rev(){
if s[i][j] == '9'{
if j == w - 1{
s[i][j - 1] = 'Y'
}
else if s[i][j + 1] == 'y' && j + 5 < w && s[i][j + 5] == 'y'{
continue;
}
else if j > 0{
s[i][j - 1] = 'Y'
}
}
}
}
for s in s{
let s = s.iter().collect::<String>();
println!("{}", s.replace("9yiwiy", "9Yiwiy"));
}
}
lp_ql