結果
問題 | No.2647 [Cherry 6th Tune A] Wind |
ユーザー |
|
提出日時 | 2024-02-23 22:15:24 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 704 bytes |
コンパイル時間 | 21,480 ms |
コンパイル使用メモリ | 352,212 KB |
最終ジャッジ日時 | 2025-02-19 20:02:18 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> #include<atcoder/all> using namespace std; using namespace atcoder; using ll=long long; void IO(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); } int main(){ IO(); ll t; cin>>t; while(t--){ ll d; long double a; cin>>d>>a; ll ans=0; for(ll i=0;i<d;i++){ long double x; cin>>x; ll ans1=x/a; ans1=(long double)ans1; long double ans2=x/a; if(ans2-ans1>=(long double)0.5){ cout<<(ll)(x/a)+1; }else{ cout<<(ll)(x/a); } if(i<d-1){ cout<<" "; } } cout<<endl; } }