Advertisement
Saleh127

CF 918B

Oct 23rd, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. map<string,string>x;
  11.  
  12. string a,c;
  13. ll e,d,i,j,k,l;
  14.  
  15. cin>>d>>e;
  16. while(d--)
  17. {
  18. cin>>a>>c;
  19. c+=';';
  20. x[c]=a;
  21. }
  22. while(e--)
  23. {
  24. cin>>a>>c;
  25. cout<<a<<" "<<c<<" #";
  26. cout<<x[c]<<endl;
  27. }
  28.  
  29. return 0;
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement