func_code_string: #include <bits/stdc++.h>   using namespace std;   bool cmp(pair<long long, int> l, pair<long long, int> r) {     return l.first < r.first;   }   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     ;     long long n, A, cf, cm, money;     cin >> n >> A >> cf >> cm >> money;     vector<pair<long long, int> > v(n + 1);     for (int i = 1; i <= n; i++) {       cin >> v[i].first;       v[i].second = i;     }     sort(v.begin(), v.end());     vector<long long> pf(n + 1, 0);     long long c = 0;     for (int i = 1; i <= n; i++) pf[i] = v[i].first + pf[i - 1];     vector<long long> ps(n + 2, 0);     for (int i = n; i >= 1; i--) ps[i] = ps[i + 1] + v[i].first;     long long ans = 0;     long long no = 0;     long long mn = 0;     for (long long i = 0; i <= n; i++) {       long long m = money;       m = m - max((long long)0, (A * i - ps[n - i + 1]));       if (m < 0) continue;       long long pnts = cf * i;       int lo = 0;       int hi = A;       while (lo < hi) {         long long mid = (lo + hi + 1) >> (long long)1;         vector<pair<long long, int> >::iterator it = lower_bound(             v.begin(), v.begin() + (n - i + 1), make_pair(mid, 0), cmp);         if (it == v.begin()) {           lo = mid;           continue;         } else           it--;         long long reqd = ((long long)(it - v.begin())) * mid - pf[it - v.begin()];         if (reqd <= m)           lo = mid;         else           hi = mid - 1;       }       pnts += lo * cm;       if (ans < pnts) {         ans = pnts;         no = i;         mn = lo;       }       ans = max(ans, pnts);     }     cout << ans <<   n ;     ;     vector<long long> re(n + 1, 0);     for (int i = n; i > n - no; i--) re[(int)v[i].second] = A;     for (int i = 1; i <= n - no; i++) re[v[i].second] = max(v[i].first, mn);     for (int i = 1; i <= n; i++) cout << re[i] <<    ;     return 0;   }   