Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- map<int, vector<string>> rel;
- int main(){
- while(1){
- int esc;
- cin >> esc;
- if(esc == 1){
- int x;
- string aux;
- cin >> x >> aux;
- rel[x].push_back(aux);
- }
- if(esc == 2){
- int x;
- cin >> x;
- for(auto p : rel[x]) cout << p << " ";
- cout << endl;
- }
- if(esc == 3) return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement