結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 21:05:20 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,309 bytes |
コンパイル時間 | 14,846 ms |
コンパイル使用メモリ | 379,332 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-06 21:05:37 |
合計ジャッジ時間 | 15,329 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 17 |
コンパイルメッセージ
warning: unused imports: `HashMap` and `HashSet` --> src/main.rs:6:24 | 6 | use std::collections::{HashMap, HashSet}; | ^^^^^^^ ^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused import: `Usize1` --> src/main.rs:9:39 | 9 | use proconio::{input, marker::{Chars, Usize1}}; | ^^^^^^
ソースコード
// #[rustfmt::skip] // pub mod lib {pub use ac_library::*;pub use itertools::{join, Combinations, Itertools, MultiProduct, Permutations};pub use proconio::{input,marker::{Chars, Usize1}};pub use std::{cmp::*, collections::*, mem::swap};pub use regex::Regex;pub use superslice::Ext;pub use num_traits::{One, ToPrimitive, FromPrimitive, PrimInt};#[macro_export]macro_rules! degg {($($val:expr),+ $(,)?) => {println!("[{}:{}] {}",file!(),line!(),{let mut parts = Vec::new();$(parts.push(format!("{} = {:?}", stringify!($val), &$val));)+parts.join(", ")})}}} // use lib::*; use std::collections::{HashMap, HashSet}; // use itertools::Itertools; use proconio::{input, marker::{Chars, Usize1}}; 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] != '9' { continue; } if j == 0 { s[i][j + 1] = 'Y'; } else if j == w - 1 { s[i][j - 1] = 'Y'; continue; } else if s[i][j - 1] == 'y' { s[i][j - 1] = 'Y'; } else { s[i][j + 1] = 'Y'; } } let ans = s[i].iter().collect::<String>(); println!("{}",ans); } }