use std::io::{stdin, stdout, BufWriter, Write}; #[derive(Default)] struct Scanner { buffer: Vec, } impl Scanner { fn next(&mut self) -> T { loop { if let Some(token) = self.buffer.pop() { return token.parse().ok().expect("Failed parse"); } let mut input = String::new(); stdin().read_line(&mut input).expect("Failed read"); self.buffer = input.split_whitespace().rev().map(String::from).collect(); } } } fn main() { let mut scan = Scanner::default(); macro_rules! input { ($T: ty) => { scan.next::<$T>() }; ($T: ty, $N: expr) => { (0..$N).map(|_| scan.next::<$T>()).collect::>() }; } let T = input!(usize); let N = input!(usize); let mut M = input!(usize); // とりあえず一日に使えるお金を均等にしてみる let C = M / T; for _ in 0..T { // output { let out = &mut BufWriter::new(stdout()); writeln!( out, "1 {}", vec![C / N; N] .iter() .map(|x| x.to_string()) .collect::>() .join(" ") ); } // input { let M_current = input!(usize); let S = input!(usize, N); let P = input!(isize, N); let R = input!(usize, N); } } }