func_code_string: #include <bits/stdc++.h>   using namespace std;   using uint = unsigned int;   struct Cup {     uint cap;     uint ix;     uint cur;   };   int main() {     uint n;     uint total;     cin >> n >> total;     vector<Cup> cups(n);     for (uint i = 0, wi; i < n; ++i) {       cin >> wi;       cups[i] = {wi, i, 0};     }     sort(cups.begin(), cups.end(),          [](const Cup& left, const Cup& right) { return left.cap < right.cap; });     uint cur = 0;     bool done = true;     for (Cup& cup : cups) {       cur = cup.cap / 2 + (cup.cap & 1);       if (cur > total) {         done = false;         break;       }       cup.cur = cur;       total -= cup.cur;     }     uint diff;     for (int i = n - 1; i > -1; --i) {       diff = min(total, cups[i].cap - cups[i].cur);       total -= diff;       cups[i].cur += diff;     }     if (total > 0) {       done = false;     }     if (!done) {       cout <<  -1 n ;     } else {       sort(cups.begin(), cups.end(),            [](const Cup& left, const Cup& right) { return left.ix < right.ix; });       for (Cup& c : cups) {         cout << c.cur <<    ;       }       cout <<   n ;     }     return 0;   }   