結果
| 問題 | No.3419 Ars magna |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-11 13:32:50 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 371 bytes |
| 記録 | |
| コンパイル時間 | 25,501 ms |
| コンパイル使用メモリ | 412,228 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 13:33:43 |
| 合計ジャッジ時間 | 26,525 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
use proconio::{fastout, input, marker::Bytes};
#[fastout]
fn main() {
input! {
n: usize,
s: Bytes,
p: [u8; n],
}
println!("{}", output(solve(s, p)));
}
fn solve(s: Vec<u8>, p: Vec<u8>) -> Vec<u8> {
p.into_iter().map(|p| s[(p - 1) as usize]).collect()
}
fn output(ans: Vec<u8>) -> String {
String::from_utf8(ans).unwrap()
}