結果
問題 |
No.2647 [Cherry 6th Tune A] Wind
|
ユーザー |
|
提出日時 | 2024-12-07 10:53:55 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 534 bytes |
コンパイル時間 | 3,237 ms |
コンパイル使用メモリ | 243,020 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-07 10:54:00 |
合計ジャッジ時間 | 4,771 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#ifndef LOCAL #include <bits/stdc++.h> using namespace std; #define debug(...) (void(0)) #else #include "algo/debug.h" #endif void solve() { int64_t D, A; cin >> D >> A; for(int i = 0; i < D; i++) { int64_t X; cin >> X; int64_t r = X / A; int64_t ans = (X * 2 < r * A * 2 + A ? r : r + 1); cout << ans << " \n"[i == D - 1]; } } int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int tt = 1; std::cin >> tt; while(tt--) { solve(); } }