func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long INF = 1e18;   const long long MAXN = 1e2 + 20;   long long n, w, ans[MAXN];   pair<long long, long long> a[MAXN];   long long sa(long long n, long long k) {     if (n % k) return n / k + 1;     return n / k;   }   void fail() {     cout << -1;     exit(0);   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cin >> n >> w;     long long kol = 0;     for (long long i = 0; i < n; i++) {       cin >> a[i].first;       a[i].second = i;       kol += sa(a[i].first, 2);     }     if (kol > w) fail();     sort(a, a + n);     for (long long i = 0; i < n - 1; i++) {       ans[a[i].second] = sa(a[i].first, 2);       w -= ans[a[i].second];     }     if (w > a[n - 1].first) {       w -= a[n - 1].first;       ans[a[n - 1].second] = a[n - 1].first;       for (long long i = n - 2; i >= 0; i--) {         if (w > a[i].first - ans[a[i].second]) {           w -= a[i].first - ans[a[i].second];           ans[a[i].second] = a[i].first;         } else {           ans[a[i].second] += w;           break;         }       }     } else {       ans[a[n - 1].second] = w;     }     for (long long i = 0; i < n; i++) cout << ans[i] <<    ;   }   