Mahmoud_Hawara

Untitled

Jul 25th, 2022
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.54 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #pragma GCC optimize("-Ofast")
  4. #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx2,tune=native")
  5. #pragma GCC optimize("-ffast-math")
  6. #pragma GCC optimize("-funroll-loops")
  7. #pragma GCC optimize("-funroll-all-loops,-fpeel-loops,-funswitch-loops")
  8. #define IO ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  9. const long long MOD = 1e9 + 7, OO = 1e18;
  10. const double PI = acos(-1);
  11. const int N = 1e6 + 5;
  12. const int dx[4] = {0, 0, 1, -1};
  13. const int dy[4] = {1, -1, 0, 0};
  14.  
  15. long long n;
  16. string s1, s2;
  17. map<string, string>mp;
  18.  
  19. int main()
  20. {
  21.     IO
  22.     cin >> n;
  23.     cin.ignore();
  24.     while (n--)
  25.     {
  26.         getline(cin, s1);
  27.         getline(cin, s2);
  28.         mp[s1] = s2;
  29.     }
  30.     cin >> n;
  31.     cin.ignore();
  32.     while (n--)
  33.     {
  34.         getline(cin, s1);
  35.         cout << mp[s1] << '\n';
  36.     }
  37.     // long long x;
  38.     // string s1, s2;
  39.     // cin >> x;
  40.     // cin.ignore();
  41.     // cout << "string1 = ";
  42.     // getline(cin, s1);
  43.     // cout << "string2 = ";
  44.     // getline(cin, s2);
  45.     // cout << s1 << '\n' << s2;
  46.     // map<long long, long long>mp;
  47.     // // key = long long, value = long long;
  48.     // mp[5] = 6;
  49.     // // mp[key] = value
  50.     // // cout << mp[key] => value
  51.     // cout << mp[5] << '\n';
  52.     // map<pair<long long, long long>, string>mp;
  53.     // mp[{1, 1}] = "mahmoud";
  54.     // cout << mp[{1, 1}];
  55.     // map<long long, long long>mp;
  56.     // mp[5] = 6;
  57.     // cout << mp[5];
  58.     // cout << '\n' << mp[4];
  59.     return 0;
  60. }
  61.  
  62.  
  63. /*
  64.  
  65. */
Advertisement
Add Comment
Please, Sign In to add comment