func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<long long int> L, R, a;   stack<long long int> same;   signed main() {     long long int n;     cin >> n;     a.resize(n, -1);     for (long long int i = 0; i < n; i++) {       long long int x;       cin >> x;       L.push_back(x);     }     for (long long int i = 0; i < n; i++) {       long long int x;       cin >> x;       R.push_back(x);     }     for (long long int i = n, k = n; k > 0; i--) {       for (long long int j = 0; j < n; j++) {         if (L[j] == 0 && R[j] == 0 && a[j] == -1) {           a[j] = i;           k--;           same.push(j);         }       }       if (same.empty()) {         cout <<  NO n ;         return 0;       }       while (!same.empty()) {         for (long long int j = same.top(); j < n; j++) {           if (a[j] == -1) L[j]--;         }         for (long long int j = same.top(); j >= 0; j--) {           if (a[j] == -1) R[j]--;         }         same.pop();       }     }     cout <<  YES n ;     for (auto i : a) cout << i <<    ;     cout << endl;   }   