#![allow(unused_imports)] #![allow(unused_macros)] #![allow(non_snake_case)] pub use __cargo_equip::prelude::*; use proconio::marker::{Bytes, Chars, Isize1, Usize1}; use proconio::{input, input_interactive}; #[allow(unused_imports)] use proconio_derive::fastout; use std::iter; /*#[fastout] fn main() { input! { N: usize, K: usize, A: [Chars; N], } for a in A { let row = a.into_iter().map(|c| { iter::repeat(c).take(K) }).flatten().collect::(); for _ in 0..K { println!("{}", row); } } }*/ fn main() { let __proconio_stdout = ::std::io::stdout(); let mut __proconio_stdout = ::std::io::BufWriter::new(__proconio_stdout.lock()); #[allow(unused_macros)] macro_rules ! print { ($ ($ tt : tt) *) => { { use std :: io :: Write as _ ; :: std :: write ! (__proconio_stdout , $ ($ tt) *) . unwrap () ; } } ; } #[allow(unused_macros)] macro_rules ! println { ($ ($ tt : tt) *) => { { use std :: io :: Write as _ ; :: std :: writeln ! (__proconio_stdout , $ ($ tt) *) . unwrap () ; } } ; } let __proconio_res = { input! { N : usize , K : usize , A : [Chars ; N] , } for a in A { let row = a .into_iter() .map(|c| iter::repeat(c).take(K)) .flatten() .collect::(); for _ in 0..K { println!("{}", row); } } }; <::std::io::BufWriter<::std::io::StdoutLock> as ::std::io::Write>::flush( &mut __proconio_stdout, ) .unwrap(); return __proconio_res; } #[macro_export] macro_rules! mat { ($($e:expr),*) => { vec![$($e),*] }; ($($e:expr,)*) => { vec![$($e),*] }; ($e:expr; $d:expr) => { vec![$e; $d] }; ($e:expr; $d:expr $(; $ds:expr)+) => { vec![mat![$e $(; $ds)*]; $d] }; } #[macro_export] macro_rules! chmin { ($a:expr, $b:expr) => { if $a > $b { $a = $b; true } else { false } }; } #[macro_export] macro_rules! chmax { ($a:expr, $b:expr) => { if $a < $b { $a = $b; true } else { false } }; } /// https://maguro.dev/debug-macro/ #[macro_export] macro_rules! debug { ($($a:expr),* $(,)*) => { #[cfg(debug_assertions)] eprintln!(concat!($("| ", stringify!($a), "={:?} "),*, "|"), $(&$a),*); }; } // The following code was expanded by `cargo-equip`. /// # Procedural macros /// /// - `proconio-derive 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)` licensed under `MIT OR Apache-2.0` #[cfg_attr(any(), rustfmt::skip)] #[allow(unused)] mod __cargo_equip { pub(crate) mod crates { pub mod proconio_derive {pub use crate::__cargo_equip::macros::proconio_derive::*;#[macro_export]macro_rules!__cargo_equip_macro_def_proconio_derive_derive_readable{($(_:tt)*)=>(::std::compile_error!("`derive_readable` from `proconio-derive 0.2.1` should have been expanded");)}#[macro_export]macro_rules!__cargo_equip_macro_def_proconio_derive_fastout{($(_:tt)*)=>(::std::compile_error!("`fastout` from `proconio-derive 0.2.1` should have been expanded");)}} } pub(crate) mod macros { pub mod proconio_derive {pub use crate::{__cargo_equip_macro_def_proconio_derive_derive_readable as derive_readable,__cargo_equip_macro_def_proconio_derive_fastout as fastout};} } pub(crate) mod prelude {pub use crate::__cargo_equip::crates::*;} mod preludes { pub mod proconio_derive {} } }