func_code_string: #include <bits/stdc++.h>   #pragma GCC optimize( O3 )   using namespace std;   int n, l[100100], r[100100];   int rs[100100], dp[2][100100];   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> n;     for (int i = 1; i <= n; i++) cin >> l[i];     for (int i = 1; i <= n; i++) cin >> r[i];     int val = n, cnt = n;     for (int i = 1; i <= n; i++) {       if (l[i] == r[i] && !r[i]) rs[i] = val, cnt--;     }     int cn = 0;     while (cnt && cn <= 10000) {       val--;       for (int i = 1; i <= n; i++) dp[0][i] = dp[0][i - 1] + (rs[i] > 0);       for (int i = n; i; i--) dp[1][i] = dp[1][i + 1] + (rs[i] > 0);       for (int i = 1; i <= n; i++) {         if (!rs[i] && dp[0][i] == l[i] && dp[1][i] == r[i]) rs[i] = val, cnt--;       }       cn++;     }     if (cn >= 10000) return cout <<  NO , 0;     for (int i = 1; i <= n; i++)       if (rs[i] <= 0) return cout <<  NO , 0;     cout <<  YES n ;     for (int i = 1; i <= n; i++) cout << rs[i] <<    ;     return 0;   }   