Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. pair <int,int> p;
  7. int t,n;
  8. char s[25];
  9. map<pair<int,int>,string> code;
  10. scanf("%d", &n);
  11. for(int i=0;i<n;i++){
  12. scanf("%d %d", &p.first, &p.second);
  13. scanf(" %s", s);
  14. code[p]=s;
  15. }
  16. scanf("%d", &t);
  17. for(int i=0;i<t;i++){
  18. scanf("%d %d", &p.first, &p.second);
  19. printf("%s\n",code[p].c_str());
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement