結果

問題 No.3420 Letter Loading
コンテスト
ユーザー urectanc
提出日時 2026-01-11 13:35:33
言語 Rust
(1.92.0 + proconio + num)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 483 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 26,301 ms
コンパイル使用メモリ 413,304 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-01-11 14:00:41
合計ジャッジ時間 24,345 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused variable: `n`
 --> src/main.rs:5:9
  |
5 |         n: usize, w: usize, h: usize,
  |         ^ help: if this is intentional, prefix it with an underscore: `_n`
  |
  = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default

ソースコード

diff #
raw source code

use proconio::{input, marker::Chars};

fn main() {
    input! {
        n: usize, w: usize, h: usize,
        s: Chars,
    }

    let mut ans = vec![vec!['x'; w]; h];
    let (mut i, mut j) = (0, 0);
    for &s in &s {
        if s == 'o' {
            ans[i][j] = 'o';
            i += 1;
        } else {
            i = 0;
            j += 1;
        }
    }

    for row in ans.iter().rev() {
        let row = row.iter().collect::<String>();
        println!("{row}");
    }
}
0