func_code_string: #include <bits/stdc++.h>   using namespace std;   int up[200005];   int down[200005];   vector<int> answer;   bool done = true;   ;   int main() {     int n;     cin >> n;     for (int i = 1; i < n; i++) {       cin >> up[i];     }     for (int i = 1; i < n; i++) {       cin >> down[i];     }     answer.push_back(0);     int previous = 0;     for (int i = 1; i < n; i++) {       if (!done) {         break;       }       done = false;       for (int j = 0; j < 4; j++) {         int x = previous & j;         int z = previous | j;         if ((x == down[i]) && (z == up[i])) {           previous = j;           done = true;           answer.push_back(previous);           break;         }       }     }     if (done) {       cout <<  YES  << endl;       for (int i = 0; i < answer.size(); i++) {         cout << answer[i] <<    ;       }     } else {       answer.clear();       previous = 1;       answer.push_back(1);       done = true;       for (int i = 1; i < n; i++) {         if (!done) {           break;         }         done = false;         for (int j = 0; j < 4; j++) {           int x = previous & j;           int z = previous | j;           if ((x == down[i]) && (z == up[i])) {             previous = j;             done = true;             answer.push_back(previous);             break;           }         }       }       if (done) {         cout <<  YES  << endl;         for (int i = 0; i < answer.size(); i++) {           cout << answer[i] <<    ;         }       } else {         answer.clear();         previous = 2;         answer.push_back(2);         done = true;         for (int i = 1; i < n; i++) {           if (!done) {             break;           }           done = false;           for (int j = 0; j < 4; j++) {             int x = previous & j;             int z = previous | j;             if ((x == down[i]) && (z == up[i])) {               previous = j;               done = true;               answer.push_back(previous);               break;             }           }         }         if (done) {           cout <<  YES  << endl;           for (int i = 0; i < answer.size(); i++) {             cout << answer[i] <<    ;           }         } else {           answer.clear();           previous = 3;           answer.push_back(3);           done = true;           for (int i = 1; i < n; i++) {             if (!done) {               break;             }             done = false;             for (int j = 0; j < 4; j++) {               int x = previous & j;               int z = previous | j;               if ((x == down[i]) && (z == up[i])) {                 previous = j;                 done = true;                 answer.push_back(previous);                 break;               }             }           }           if (done) {             cout <<  YES  << endl;             for (int i = 0; i < answer.size(); i++) {               cout << answer[i] <<    ;             }           } else {             cout <<  NO  << endl;           }         }       }     }     return 0;   }   