func_code_string: #include <bits/stdc++.h>   using namespace std;   int a[100000];   int b[100000];   int c[100000];   struct P {     int a, b;   } p[100000];   int cmp(P x, P y) { return x.a < y.a; }   int main() {     int n, x;     while (cin >> n) {       for (int i = 1; i <= n; i++) {         cin >> x;         a[x] = i;       }       for (int i = 1; i <= n; i++) {         cin >> x;         b[x] = i;         p[i - 1].a = i;         p[i - 1].b = x;       }       for (int i = 1; i <= n; i++) {         int key = a[i];         int l = 0, r = n, mid;         while (l < r) {           mid = (l + r) / 2;           if (p[mid].a == key) {             if (i != n)               cout << p[mid].b <<    ;             else               cout << p[mid].b << endl;             break;           } else if (p[mid].a > key)             r = mid;           else             l = mid + 1;         }       }     }     return 0;   }   