Language: C++

int main(){
  std::string s;
  int p;
  std::map<std::string,std::vector<int> > m;
  while(std::cin>>s>>p,p!=0){
    m[s].push_back(p);
  }
  std::map<std::string,std::vector<int> >::iterator m_it = m.begin();
  while(m_it!=m.end()){
    std::cout<<(*m_it).first<<std::endl;
    std::vector<int> v = (*m_it).second;
    std::sort(v.begin(),v.end());
    std::vector<int>::iterator v_it = v.begin();
    while(v_it!=v.end()){
      std::cout<<*v_it;
      v_it++;
      (v_it==v.end())?std::cout<<std::endl:std::cout<<" ";
    }
    m_it++;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:8: error: 'string' is not a member of 'std'
    2 |   std::string s;
      |        ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | int main(){
a.cc:4:8: error: 'map' is not a member of 'std'
    4 |   std::map<std::string,std::vector<int> > m;
      |        ^~~
a.cc:1:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
  +++ |+#include <map>
    1 | int main(){
a.cc:4:17: error: 'string' is not a member of 'std'
    4 |   std::map<std::string,std::vector<int> > m;
      |                 ^~~~~~
a.cc:4:17: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:4:29: error: 'vector' is not a member of 'std'
    4 |   std::map<std::string,std::vector<int> > m;
      |                             ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | int main(){
a.cc:4:36: error: expected primary-expression before 'int'
    4 |   std::map<std::string,std::vector<int> > m;
      |                                    ^~~
a.cc:5:14: error: 'cin' is not a member of 'std'
    5 |   while(std::cin>>s>>p,p!=0){
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:5:19: error: 's' was not declared in this scope
    5 |   while(std::cin>>s>>p,p!=0){
      |                   ^
a.cc:6:5: error: 'm' was not declared in this scope
    6 |     m[s].push_back(p);
      |     ^
a.cc:8:8: error: 'map' is not a member of 'std'
    8 |   std::map<std::string,std::vector<int> >::iterator m_it = m.begin();
      |        ^~~
a.cc:8:8: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
a.cc:8:17: error: 'string' is not a member of 'std'
    8 |   std::map<std::string,std::vector<int> >::iterator m_it = m.begin();
      |                 ^~~~~~
a.cc:8:17: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
a.cc:8:29: error: 'vector' is not a member of 'std'
    8 |   std::map<std::string,std::vector<int> >::iterator m_it = m.begin();
      |                             ^~~~~~
a.cc:8:29: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:8:36: error: expected primary-expression before 'int'
    8 |   std::map<std::string,std::vector<int> >::iterator m_it = m.begin();
      |                                    ^~~
a.cc:9:9: error: 'm_it' was not declared in this scope
    9 |   while(m_it!=m.end()){
      |         ^~~~
a.cc:9:15: error: 'm' was not declared in this scope
    9 |   while(m_it!=m.end()){
      |               ^
a.cc:10:10: error: 'cout' is not a member of 'std'
   10 |     std::cout<<(*m_it).first<<std::endl;
      |          ^~~~
a.cc:10:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:36: error: 'endl' is not a member of 'std'
   10 |     std::cout<<(*m_it).first<<std::endl;
      |                                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
a.cc:11:10: error: 'vector' is not a member of 'std'
   11 |     std::vector<int> v = (*m_it).second;
      |          ^~~~~~
a.cc:11:10: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:11:17: error: expected primary-expression before 'int'
   11 |     std::vector<int> v = (*m_it).second;
      |                 ^~~
a.cc:12:10: error: 'sort' is not a member of 'std'
   12 |     std::sort(v.begin(),v.end());
      |          ^~~~
a.cc:12:15: error: 'v' was not declared in this scope
   12 |     std::sort(v.begin(),v.end());
      |               ^
a.cc:13:10: error: 'vector' is not a member of 'std'
   13 |     std::vector<int>::iterator v_it = v.begin();
      |          ^~~~~~
a.cc:13:10: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:13:17: error: expected primary-expression before 'int'
   13 |     std::vector<int>::iterator v_it = v.begin();
      |                 ^~~
a.cc:14:11: error: 'v_it' was not declared in this scope
   14 |     while(v_it!=v.end()){
      |           ^~~~
a.cc:15:12: error: 'cout' is not a member of 'std'
   15 |       std::cout<<*v_it;
      |            ^~~~
a.cc:15:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:28: error: 'cout' is not a member of 'std'
   17 |       (v_it==v.end())?std::cout<<std::endl:std::cout<<" ";
      |                            ^~~~
a.cc:17:28: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:39: error: 'endl' is not a member of 'std'
   17 |       (v_it==v.end())?std::cout<<std::endl:std::cout<<" ";
      |                                       ^~~~
a.cc:17:39: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:17:49: error: 'cout' is not a member of 'std'
   17 |       (v_it==v.end())?std::cout<<std::endl:std::cout<<" ";
      |                                                 ^~~~
a.cc:17:49: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'