結果
| 問題 |
No.2728 Grid Expansion
|
| コンテスト | |
| ユーザー |
yosupot
|
| 提出日時 | 2024-04-19 21:44:54 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 413 bytes |
| コンパイル時間 | 12,369 ms |
| コンパイル使用メモリ | 402,236 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-11 14:38:35 |
| 合計ジャッジ時間 | 13,368 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
use proconio::{input, marker::Bytes};
use std::iter;
fn main() {
input! {
n: i32,
k: i32,
a: [Bytes; n],
}
let a = a
.iter()
.map(|x| x.iter().flat_map(|&y| iter::repeat(y).take(k as usize)));
let a = a.flat_map(|x| iter::repeat(x).take(k as usize));
let a = a.map(|x| String::from_utf8(x.collect()).unwrap());
a.for_each(|x| println!("{}", x));
}
yosupot