Language: C++

#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <algorithm>
using std::cin;
using std::cout;
using std::endl;

int main(){
  int n,m;
  cin >> n >> m;
  map<string,int> mp;
  vector<string> s(n);
  for (int i=0;i<n;++i) cin >> s[i];
  vector<string> t(m);
  for (int i=0;i<m;++i) cin >> t[i];

  for (int i=0;i<n;++i){
      mp[s[i]]++;
  }
  for (int i=0;i<m;++i){
      mp[t[i]]--;
  }
  cout << std::max(0, std::max_element(mp.begin(), mp.end())->second) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'map' was not declared in this scope
   13 |   map<string,int> mp;
      |   ^~~
a.cc:13:3: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:13:7: error: 'string' was not declared in this scope
   13 |   map<string,int> mp;
      |       ^~~~~~
a.cc:13:7: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:13:14: error: expected primary-expression before 'int'
   13 |   map<string,int> mp;
      |              ^~~
a.cc:14:3: error: 'vector' was not declared in this scope
   14 |   vector<string> s(n);
      |   ^~~~~~
a.cc:14:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:14:18: error: 's' was not declared in this scope
   14 |   vector<string> s(n);
      |                  ^
a.cc:16:18: error: 't' was not declared in this scope
   16 |   vector<string> t(m);
      |                  ^
a.cc:20:7: error: 'mp' was not declared in this scope; did you mean 'm'?
   20 |       mp[s[i]]++;
      |       ^~
      |       m
a.cc:23:7: error: 'mp' was not declared in this scope; did you mean 'm'?
   23 |       mp[t[i]]--;
      |       ^~
      |       m
a.cc:25:40: error: 'mp' was not declared in this scope; did you mean 'm'?
   25 |   cout << std::max(0, std::max_element(mp.begin(), mp.end())->second) << endl;
      |                                        ^~
      |                                        m