P3156 【深基15.例1】询问学号
#include <bits/stdc++.h>
using namespace std;
int n, m, tmp;
vector<int> stu;
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
cin >> tmp;
stu.push_back(tmp);
}
for (int i = 1; i <= m; i++) {
cin >> tmp;
cout << stu[tmp - 1] << endl;
}
return 0;
}