OMEGAHEAD_MonkoX

C

Jan 20th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <string>
  4. #include <sstream>
  5. #include <algorithm>
  6. #include <vector>
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. #include <fstream>
  10. #include <stack>
  11. #include <map>
  12. #include <cstring>
  13. #include <cmath>
  14. #include <set>
  15. #include <iterator>
  16. #include <cmath>
  17.  
  18. using namespace std;
  19.  
  20. istream & operator >> (istream & in, vector<int> & v)
  21. {
  22. string str;
  23. getline(in,str);
  24. stringstream stream(str);
  25. int tmp;
  26. while(stream >> tmp)
  27. v.push_back(tmp);
  28. return in;
  29. }
  30.  
  31.  
  32. int main()
  33. {
  34. map<string, string> d;
  35. int N;
  36. string a, b;
  37. cin >> N;
  38. for(auto i = 0; i < N; ++i)
  39. {
  40. cin >> a >> b;
  41. d[a] = b;
  42. d[b] = a;
  43. }
  44. cin >> a;
  45. cout << d[a];
  46. return 0;
  47. }
Add Comment
Please, Sign In to add comment