diff --git a/problem/P3156/P3156.cpp b/problem/P3156/P3156.cpp new file mode 100644 index 00000000..45100f7c --- /dev/null +++ b/problem/P3156/P3156.cpp @@ -0,0 +1,18 @@ +// R38858817 + +#include + +using namespace std; + +int main() { + int n, m, a[10000005], q; + cin >> n >> m; + for (int i = 0; i < n; i++) { + cin >> a[i]; + } + for (int i = 0; i < m; i++) { + cin >> q; + cout << a[q-1] << endl; + } + return 0; +}