1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#include <iostream> #include <vector> using namespace std; int () { int n; cin >> n; vector<int> v(n,0); int t = v(); for(int i = 0; i <= t-1; ++i) cin >> v[i]; vector<int> u(n,0); for(int j = 0; j <= t-1; ++j) { cin >> u[j]; u[j] = v[u[j]]; } for(int k = 0; k <= t-1; ++k) cout << u[k]; cout << endl; } |
Pastie
