func_code_string: #include <bits/stdc++.h>   using namespace std;   void solve(priority_queue<pair<long long, int>, vector<pair<long long, int> >,                             greater<pair<long long, int> > > &P,              priority_queue<pair<long long, int> > &N, vector<long long> &ans,              int k, int x) {     while (k > 0) {       int ps = P.size(), pn = N.size();       if (ps && pn) {         pair<long long, int> pt = P.top();         P.pop();         pair<long long, int> nt = N.top();         N.pop();         int sign = (pn & 1) ? -1 : 1;         if (nt.first * -1 <= pt.first) {           nt.first += sign * x;           if (nt.first >= 0) {             P.push(nt);             P.push(pt);           } else {             N.push(nt);             P.push(pt);           }         } else {           pt.first -= sign * x;           if (pt.first < 0) {             N.push(nt);             N.push(pt);           } else {             N.push(nt);             P.push(pt);           }         }       } else if (ps) {         pair<long long, int> pt = P.top();         P.pop();         pt.first -= x;         if (pt.first < 0) {           N.push(pt);         } else {           P.push(pt);         }       } else {         pair<long long, int> nt = N.top();         N.pop();         int sign = (pn & 1) ? -1 : 1;         nt.first += sign * x;         if (nt.first >= 0) {           P.push(nt);         } else {           N.push(nt);         }       }       k--;     }     while (!P.empty()) {       pair<long long, int> it = P.top();       P.pop();       ans[it.second] = it.first;     }     while (!N.empty()) {       pair<long long, int> it = N.top();       N.pop();       ans[it.second] = it.first;     }   }   int main() {     int n, k, x, t;     while (cin >> n >> k >> x) {       priority_queue<pair<long long, int>, vector<pair<long long, int> >,                      greater<pair<long long, int> > >           Qp;       priority_queue<pair<long long, int> > Qn;       for (int i = 0; i < n; i++) {         cin >> t;         if (t >= 0)           Qp.push(make_pair(t, i));         else           Qn.push(make_pair(t, i));       }       vector<long long> ans(n);       solve(Qp, Qn, ans, k, x);       for (int i = 0; i < n; i++) cout << ans[i] <<    ;       cout << endl;     }   }   