Language: C++

#include"bits/stdc++.h"
usingnamespace std;
int main(){
  map<string,int>Red,Blue;
  
  int n,cin >>n;
  vector<string> s(n);
  for(int i=0;i<n;i++){
    cin >> s[i];
    Red[s[i]]++;
  }
  int m;cin >> m;
  vector<string> t(m);
  for(int i=0;i<m;i++){
    cin >> t[i];
    Blue[t[i]]++;}
  int ans=0;
  for(int i=0;i<n;i++){
    int score=0;
    score=Red[s.at(i)]-Blue[s.at(i)];
    }
    else{
      score=Red[s.at(i)];
    }
    if(ans<score){
      ans=score;
    }
  cout << ans << endl;
  }

Compiler output:
a.cc:2:1: error: 'usingnamespace' does not name a type
    2 | usingnamespace std;
      | ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'map' was not declared in this scope
    4 |   map<string,int>Red,Blue;
      |   ^~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/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:4:7: error: 'string' was not declared in this scope
    4 |   map<string,int>Red,Blue;
      |       ^~~~~~
a.cc:4:7: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:14: error: expected primary-expression before 'int'
    4 |   map<string,int>Red,Blue;
      |              ^~~
a.cc:6:13: error: expected initializer before '>>' token
    6 |   int n,cin >>n;
      |             ^~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<string> s(n);
      |   ^~~~~~
a.cc:7:3: note: suggested alternatives:
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:
/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:7:18: error: 's' was not declared in this scope
    7 |   vector<string> s(n);
      |                  ^
a.cc:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin >> s[i];
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:5: error: 'Red' was not declared in this scope
   10 |     Red[s[i]]++;
      |     ^~~
a.cc:12:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   12 |   int m;cin >> m;
      |         ^~~
      |         std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:18: error: 't' was not declared in this scope
   13 |   vector<string> t(m);
      |                  ^
a.cc:16:5: error: 'Blue' was not declared in this scope
   16 |     Blue[t[i]]++;}
      |     ^~~~
a.cc:20:11: error: 'Red' was not declared in this scope
   20 |     score=Red[s.at(i)]-Blue[s.at(i)];
      |           ^~~
a.cc:20:24: error: 'Blue' was not declared in this scope
   20 |     score=Red[s.at(i)]-Blue[s.at(i)];
      |                        ^~~~
a.cc:22:5: error: 'else' without a previous 'if'
   22 |     else{
      |     ^~~~
a.cc:23:7: error: 'score' was not declared in this scope
   23 |       score=Red[s.at(i)];
      |       ^~~~~
a.cc:23:13: error: 'Red' was not declared in this scope
   23 |       score=Red[s.at(i)];
      |             ^~~
a.cc:23:22: error: 'i' was not declared in this scope
   23 |       score=Red[s.at(i)];
      |                      ^
a.cc:25:12: error: 'score' was not declared in this scope
   25 |     if(ans<score){
      |            ^~~~~
a.cc:28:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:28:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   28 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~