Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<string>S(N);
  for(int i=0;i<N;i++){
    cin>>S.at(i);
  }
  vector<pair<int,string>>SS(0);
  SS.push_buck((1,S.at(0)));
  if(N>1){
    for(int i=1;i<N;i++){
      bool flag=false;
      for(int j=0;j<SS.size();j++){
        if(S.at(i)==SS.at(j).second){
          SS.at(j).first=SS.at(j).first+1;
          flag=true;
        }
      }
      if(flag==false){
        SS.push_back((1,S.at(i)));
      }
    }
  }
  sort(SS.begin(),SS.end());
  reverse(SS.begin(),SS.end());
  int M=SS.at(0).first;
  for(int i=0;i<SS.size();i++){
    if(SS.at(i).first==M){
      cout<<SS.at(i).second<<endl;
    }
  }
}
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'push_buck'; did you mean 'push_back'?
   11 |   SS.push_buck((1,S.at(0)));
      |      ^~~~~~~~~
      |      push_back
a.cc:22:21: error: no matching function for call to 'std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::push_back(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   22 |         SS.push_back((1,S.at(i)));
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<int, std::__cxx11::basic_string<char> > >; value_type = std::pair<int, std::__cxx11::basic_string<char> >]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'const std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::value_type&' {aka 'const std::pair<int, std::__cxx11::basic_string<char> >&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<int, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<int, std::__cxx11::basic_string<char> > >; value_type = std::pair<int, std::__cxx11::basic_string<char> >]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::value_type&&' {aka 'std::pair<int, std::__cxx11::basic_string<char> >&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~