結果

問題 No.3261 yiwiy9 → yiwiY9
ユーザー fumin
提出日時 2025-09-07 00:57:40
言語 Rust
(1.83.0 + proconio)
結果
RE  
実行時間 -
コード長 725 bytes
コンパイル時間 13,270 ms
コンパイル使用メモリ 400,120 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-09-07 00:57:56
合計ジャッジ時間 14,947 ms
ジャッジサーバーID
(参考情報)
judge / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10 WA * 17 RE * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 l = "yiwiy9".chars().collect::<Vec<_>>();
    let r = "9yiwiy".chars().collect::<Vec<_>>();
    for i in 0..h {
        for j in 0..=w.saturating_sub(6) {
            if s[i][j..j+6] == l {
                s[i][j+4] = 'Y';
            } else if s[i][j..j+6] == r {
                s[i][j+1] = 'Y';
            }
        }
    }
    for i in 0..h {
        println!("{}", s[i].iter().collect::<String>());
    }
}

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