You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#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;
|
|
} |