Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <string>
- #include <sstream>
- #include <algorithm>
- #include <vector>
- #include <stdlib.h>
- #include <stdio.h>
- #include <fstream>
- #include <stack>
- #include <map>
- #include <cstring>
- #include <cmath>
- #include <set>
- #include <iterator>
- #include <cmath>
- using namespace std;
- istream & operator >> (istream & in, vector<int> & v)
- {
- string str;
- getline(in,str);
- stringstream stream(str);
- int tmp;
- while(stream >> tmp)
- v.push_back(tmp);
- return in;
- }
- int main()
- {
- map<string, string> d;
- int N;
- string a, b;
- cin >> N;
- for(auto i = 0; i < N; ++i)
- {
- cin >> a >> b;
- d[a] = b;
- d[b] = a;
- }
- cin >> a;
- cout << d[a];
- return 0;
- }
Add Comment
Please, Sign In to add comment