Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <map>
- #include <string>
- using namespace std;
- map<string, string> m;
- int main() {
- ios_base::sync_with_stdio(false);
- cin.tie(0);
- int n;
- cin >> n;
- for (int i = 0; i < n; i++) {
- string a, temp, b;
- cin >> a >> temp >> b;
- m[a] = b;
- }
- int T;
- cin >> T;
- while (T--) {
- int k;
- cin >> k;
- for (int i = 0; i < k; i++) {
- string a;
- cin >> a;
- cout << m[a] << ' ';
- }
- cout << '\n';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement