func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 1 << 29;   int main() {     ios::sync_with_stdio(0);     int n;     cin >> n;     int a[n];     for (int i = 0; i < (n); i++) cin >> a[i];     int b[n];     for (int i = 0; i < (n); i++) cin >> b[i];     set<int> rem;     int top = 0;     for (int i = 0; i < (n); i++) {       int curr = 0;       if (rem.find(b[i]) != rem.end()) {         cout << curr <<    ;         continue;       }       while (top < n) {         if (a[top + curr] != b[i]) {           rem.insert(a[top + curr]);           ++curr;         } else {           rem.insert(a[top + curr]);           break;         }       }       top += curr + 1;       cout << curr + 1 <<    ;     }     cout << endl;     return 0;   }   