結果
| 問題 | No.3420 Letter Loading |
| コンテスト | |
| ユーザー |
mentos_grape
|
| 提出日時 | 2026-01-11 13:35:10 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 1,150 bytes |
| 記録 | |
| コンパイル時間 | 23,562 ms |
| コンパイル使用メモリ | 417,768 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-01-11 14:00:12 |
| 合計ジャッジ時間 | 24,470 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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
ソースコード
#![allow(unused_imports)]
fn main() {
input! {
n: usize, w: usize, h: usize,
s: String,
}
let mut ans = mvec!['x'; (h, w)];
let (mut i, mut j) = (0, 0);
for c in s.chars() {
if c == 'o' {
ans[h-1-i][j] = 'o';
i += 1;
} else {
i = 0;
j += 1;
}
}
for a in ans {
for a in a {
print!("{a}");
}
println!();
}
}
use proconio::{input, marker::*};
use std::{cmp::Reverse, collections::*};
#[macro_export]
macro_rules! chmax {
($a:expr, $b:expr) => {{
let tmp = $b;
if $a < tmp {
$a = tmp;
true
} else {
false
}
}};
}
#[macro_export]
macro_rules! chmin {
($a:expr, $b:expr) => {{
let tmp = $b;
if $a > tmp {
$a = tmp;
true
} else {
false
}
}};
}
#[macro_export]
/// mvec![]
macro_rules! mvec {
($val:expr; ()) => {
$val
};
($val:expr; ($size:expr $(,$rest:expr)*)) => {
vec![mvec![$val; ($($rest),*)]; $size]
};
}
mentos_grape