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, q;
|
|
unordered_map<int, int> _map;
|
|
|
|
int main() {
|
|
cin >> n;
|
|
for (int i = 1; i <= n; i++) {
|
|
int cnt;
|
|
cin >> cnt;
|
|
_map[cnt] = i;
|
|
}
|
|
cin >> q;
|
|
while (q--) {
|
|
int m;
|
|
cin >> m;
|
|
cout << _map[m] << endl;
|
|
}
|
|
return 0;
|
|
} |