/** * auther: deviceF * created: 19.04.2024 07:15:04 **/ #include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while (t--) { long long n, d; cin >> n >> d; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { a[i] = ((a[i] * 2) + (long long)d) / (2 * (long long)d); } for (auto i : a) { cout << i << " "; } cout << '\n'; } return 0; }