#include <bits/stdc++.h>   using namespace std;   struct node {     int Tea;     int Index;     friend bool operator<(const node& a, const node& b) { return a.Tea > b.Tea; }   } D[105];   int main() {     int i, n, w, Ans[105];     scanf( %d%d , &n, &w);     for (i = 0; i < n; i++) {       scanf( %d , &D[i].Tea);       D[i].Index = i;     }     sort(D, D + n);     int Judge = 0;     for (i = 0; i < n; i++) Judge += (D[i].Tea + 1) / 2;     if (Judge > w)       printf( -1 n );     else {       w -= Judge;       for (i = 0; i < n; i++) Ans[D[i].Index] = (D[i].Tea + 1) / 2;       for (i = 0; i < n && w; i++) {         if (w >= D[i].Tea - Ans[D[i].Index])           w -= D[i].Tea - Ans[D[i].Index], Ans[D[i].Index] = D[i].Tea;         else           Ans[D[i].Index] += w, w = 0;       }       for (i = 0; i < n; i++) {         if (i) printf(   );         printf( %d , Ans[i]);       }       printf(  n );     }     return 0;   }   