#![allow(non_snake_case)] use proconio::input; fn solve() { input! { D: i32, A: i64, X: [i64;D], } let mut ret = Vec::::new(); for x in X { let a = x / A; let b = x % A; let val = a + (2 * b >= A) as i64; ret.push(val); } for i in 0..ret.len() { if i > 0 { print!(" "); } print!("{}", ret[i]); } println!(); } fn main() { input! { T: i32, } for _ in 0..T { solve() } }