Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int N, Q;
- cin >> N >> Q;
- map<string, string> traduccion;
- string aux1, aux2;
- for(int i = 0; i < N; i++)
- {
- cin >> aux1 >> aux2;
- traduccion[aux1] = aux2;
- }
- string query;
- for(int i = 0; i < Q; i++)
- {
- cin >> query;
- if(traduccion[query].empty()) continue;
- cout << traduccion[query] << "\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment