結果
| 問題 | No.1628 Sorting Integers (MAX of M) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-11 22:31:00 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 430 bytes |
| 記録 | |
| コンパイル時間 | 22,773 ms |
| コンパイル使用メモリ | 418,384 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-01-11 22:31:25 |
| 合計ジャッジ時間 | 23,887 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 6 |
ソースコード
use proconio::{fastout, input};
#[fastout]
fn main() {
input! {
n: u8,
c: [u8; 9],
}
println!("{}", output(solve(n, c)))
}
fn solve(_n: u8, c: Vec<u8>) -> Vec<u8> {
c.into_iter()
.enumerate()
.rev()
.map(|(i, c)| [b'0' + (i + 1) as u8].repeat(c as usize))
.flatten()
.collect()
}
fn output(ans: Vec<u8>) -> String {
String::from_utf8(ans).unwrap()
}