結果

問題 No.1738 What's in the box?
ユーザー kazuppakazuppa
提出日時 2024-08-12 20:10:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 2,062 bytes
コンパイル時間 3,580 ms
コンパイル使用メモリ 231,760 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-08-12 20:10:34
合計ジャッジ時間 6,406 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 RE -
testcase_32 RE -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
testcase_59 WA -
testcase_60 WA -
testcase_61 WA -
testcase_62 WA -
testcase_63 WA -
testcase_64 WA -
testcase_65 WA -
testcase_66 WA -
testcase_67 WA -
testcase_68 WA -
testcase_69 WA -
testcase_70 WA -
testcase_71 WA -
testcase_72 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
#pragma GCC target ("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
using namespace atcoder;
using ll=long long;
#define endl "\n"
#define rep(i,a,b) for(it i=(it)(a);i<=(it)b;i++)
#define nrep(i,a,b) for(it i=(it)(a);i>=(it)b;i--)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define moda 998244353LL
#define modb 1000000007LL
#define dai 2500000000000000000LL
#define tyu 2500000000
#define giri 1000000000
#define en 3.14159265358979
#define sho -dai
#define eps 1e-14
#define yn(x) cout<<(x ? "Yes\n":"No\n");
#define YN(x) cout<<(x ? "YES\n":"NO\n");
using it=long long;
using un=unsigned long long;
using db=long double;
using st=string;
using ch=char;
using bo=bool;
using P=pair<it,it>;
using ip=pair<int,int>;
using mint=modint;
using mints=modint998244353;
using vi=vector<it>;
using ivi=vector<int>;
using vd=vector<db>;
using vs=vector<st>;
using vc=vector<ch>;
using vb=vector<bo>;
using vp=vector<P>;
using ivp=vector<ip>;
using vm=vector<mint>;
using sp=set<P>;
using isp=set<ip>;
using ss=set<st>;
using sc=set<ch>;
using si=set<it>;
using isi=set<int>;
using svi=set<vi>;
using vvi=vector<vi>;
using ivvi=vector<ivi>;
using vvd=vector<vd>;
using vvs=vector<vs>;
using vvb=vector<vb>;
using vvc=vector<vc>;
using vvp=vector<vp>;
using ivvp=vector<ivp>;
using vvm=vector<vm>;
using vsi=vector<si>;
using ivsi=vector<isi>;
using vsp=vector<sp>;
using ivsp=vector<isp>;
using vvsi=vector<vsi>;
using ivvsi=vector<ivsi>;
using vvsp=vector<vsp>;
using ivvsp=vector<ivsp>;
using vvvi=vector<vvi>;
using ivvvi=vector<ivvi>;
using vvvd=vector<vvd>;
using vvvm=vector<vvm>;
using vvvvi=vector<vvvi>;
using ivvvvi=vector<ivvvi>;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;it m,sum=0;cin>>n>>m;
  vi w(n);
  rep(i,0,n-1){
    cin>>w[i];
    sum+=w[i];
  }
  rep(i,0,n-1)cout<<(m>=sum?w[i]*(m/sum):w[i]/(sum/m))<<" ";
  cout<<endl;
}
0