//! # Bundled libraries //! //! - `procon_reader 0.1.0 (git+https://github.com/ia7ck/rust-competitive-programming#ed937ca54c1c4220ab9bc2901a6189b8d58a80a4)` licensed under **missing** as `crate::__cargo_equip::crates::procon_reader` pub use __cargo_equip::prelude::*; use procon_reader::ProconReader; fn main() { let stdin = std::io::stdin(); let mut rd = ProconReader::new(stdin.lock()); let n: usize = rd.get(); let m: usize = rd.get(); let k: usize = rd.get(); let mut tail = Vec::new(); let mut inv = 0; let mut a = Vec::new(); for x in (1..=n).rev() { if inv + (x - 1).saturating_sub(tail.len()) <= k { inv += (x - 1).saturating_sub(tail.len()); a.push(x); } else { tail.push(x); } } tail.reverse(); a.extend(tail); let s = a.iter().copied().sum::(); assert!(s <= m); let i = a.iter().position(|&x| x == n).unwrap(); a[i] += m - s; for x in a { println!("{}", x); } } // The following code was expanded by `cargo-equip`. #[rustfmt::skip] #[allow(unused)] mod __cargo_equip { pub(crate) mod crates { pub mod procon_reader {use std::io::BufRead;use std::str::FromStr;pub struct ProconReader{r:R,l:String,i:usize,}implProconReader{pub fn new(reader:R)->Self{Self{r:reader,l:String::new(),i:0,}}pub fn get(&mut self)->T where T:FromStr,::Err:std::fmt::Debug,{self.skip_blanks();assert!(self.i{self.i+=j;break;}None=>{let mut buf=String::new();let num_bytes=self.r.read_line(&mut buf).unwrap_or_else(|_|panic!("invalid UTF-8"));assert!(num_bytes>0,"reached EOF :(");self.l=buf.trim_end_matches('\n').trim_end_matches('\r').to_string();self.i=0;}}}}pub fn get_vec(&mut self,n:usize)->Vecwhere T:FromStr,::Err:std::fmt::Debug,{(0..n).map(|_|self.get()).collect()}pub fn get_chars(&mut self)->Vec{self.get::().chars().collect()}}} } pub(crate) mod macros { pub mod procon_reader {} } pub(crate) mod prelude {pub use crate::__cargo_equip::crates::*;} mod preludes { pub mod procon_reader {} } }