結果

問題 No.3261 yiwiy9 → yiwiY9
ユーザー fumin
提出日時 2025-09-07 01:16:57
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 873 bytes
コンパイル時間 12,935 ms
コンパイル使用メモリ 398,488 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-07 01:17:11
合計ジャッジ時間 13,511 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: type `us` should have an upper camel case name
 --> src/main.rs:9:6
  |
9 | type us = usize;
  |      ^^ help: convert the identifier to upper camel case (notice the capitalization): `Us`
  |
  = note: `#[warn(non_camel_case_types)]` on by default

ソースコード

diff #

#![allow(unused_imports)]
use std::{*, collections::*, ops::*, cmp::*, iter::*};
use proconio::{input, fastout};

fn main() {
    solve();
}

type us = usize;

// CONTEST(abcXXX-a)
#[fastout]
fn solve() {
    input! {h:us,w:us,mut s:[proconio::marker::Chars;h]}
    let r = "yiwiy9".chars().collect::<Vec<_>>();
    let l = "9yiwiy".chars().collect::<Vec<_>>();
    for i in 0..h {
        let mut j = 0;
        while j < w {
            let t = s[i][j..].iter().take(6).cloned().collect::<Vec<_>>();
            if t == r {
                s[i][j+4] = 'Y';
                j += 6;
            } else if t == l {
                s[i][j+1] = 'Y';
                j += 6;
            } else {
                j += 1;
            }
        }
    }
    for i in 0..h {
        println!("{}", s[i].iter().collect::<String>());
    }
}

// #CAP(fumin::modint)
pub mod fumin {
}
0