func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename T>   ostream& operator<<(ostream& o, const vector<T>& v) {     o <<  [ ;     int b = 0;     for (const auto& a : v) o << (b++ ?  ,   :   ) << a;     o <<  ] ;     return o;   }   template <typename T, typename U>   ostream& operator<<(ostream& o, const pair<T, U>& p) {     o <<  (  << p.first <<  ,   << p.second <<  ) ;     return o;   }   template <typename T>   ostream& operator<<(ostream& o, const set<T>& s) {     o <<  { ;     int b = 0;     for (auto& e : s) o << (b++ ?  ,   :   ) << e;     o <<  } ;     return o;   }   template <typename T, typename U>   ostream& operator<<(ostream& o, const map<T, U>& m) {     o <<  { ;     int b = 0;     for (auto& e : m) o << (b++ ?  ,   :   ) << e;     o <<  } ;     return o;   }   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     int n;     cin >> n;     bool flag = 0;     vector<int> A(n);     for (auto& a : A) {       cin >> a;       if (a % 2 and flag) {         if (a < 0) {           a = a / 2;         } else {           a = (a + 1) / 2;         }         flag ^= 1;       } else if (a % 2) {         if (a < 0) {           a = (a - 1) / 2;         } else {           a = a / 2;         }         flag ^= 1;       } else {         a = a / 2;       }     }     for (auto& a : A) cout << a << endl;   }   