criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define LOOP(val,times) for(val = 0;val < (times);++val)

int main(){
  int n,m,i,mx;
  string s;
  map <string,int> mp;
  scanf("%d",&n);
  LOOP(i,n){
    cin >> s;
    mp[s] ++;
  }
  scanf("%d",&m);
  LOOP(i,m){
    cin >> s;
    mp[s]--;
  }
  mx = 0;
  for(auto itr = mp.begin();itr != mp.end();itr++){
    mx = max(*itr,mx);
  }
  if(mx <= 0) printf("1");
  else printf("%d",mx);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: no matching function for call to 'max(std::pair<const std::__cxx11::basic_string<char>, int>&, int&)'
   22 |     mx = max(*itr,mx);
      |          ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:22:13: note:   deduced conflicting types for parameter 'const _Tp' ('std::pair<const std::__cxx11::basic_string<char>, int>' and 'int')
   22 |     mx = max(*itr,mx);
      |          ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:22:13: note:   'std::pair<const std::__cxx11::basic_string<char>, int>' is not derived from 'std::initializer_list<_Tp>'
   22 |     mx = max(*itr,mx);
      |          ~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main(){
  int n,m;
  
  cin>>n;
  vector<string> s(n);
  REP(i,n){
    cin>>s[i];
  }
  
  cin>>m;
  vector<string> t(n);
  REP(i,n){
    cin>>t[i];
  }
  
  int ans=0;
  int res=0;
  REP(i,n){
    REP(j,n){
      if(s[i]==s[j])){
        res++;
      }
    }
    
    REP(j,m){
      if(s[i]==t[j])){
        res--;
      }
    }
    
    ans=max(ans,res);
    res=0;
  }
  
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: expected primary-expression before ')' token
   24 |       if(s[i]==s[j])){
      |                     ^
a.cc:30:21: error: expected primary-expression before ')' token
   30 |       if(s[i]==t[j])){
      |                     ^
Language: C++

#include <bits/stdc++.h>
#include REP(i,n) for(int i=0;i<n;i++)
using namespace std;

bool same(string s, string t){
  if(s.size()!=t.size()){
    return false;
  }else{
    REP(i,s.size()){
      if(s[i]!=t[i]){
        return false;
      }
    }
    return true;
  }
}

int main(){
  int n,m;
  
  cin>>n;
  vector<string> s(n);
  REP(i,n){
    cin>>s[i];
  }
  
  cin>>m;
  vector<string> t(n);
  REP(i,n){
    cin>>t[i];
  }
  
  vector<int> money;
  money.push_back(0);
  int res=0;
  REP(i,n){
    REP(j,n){
      if(same(s[i],s[j])){
        res++;
      }
    }
    
    REP(j,m){
      if(same(s[i],t[j])){
        res--;
      }
    }
    
    money.push_back(res);
    res=0;
  }
  
  sort(money.begin(),money.end());
  reverse(money.begin(),money.end());
  
  cout<<money[0]<<endl;
  return 0;
}

Compiler output:
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include REP(i,n) for(int i=0;i<n;i++)
      |          ^~~
a.cc: In function 'bool same(std::string, std::string)':
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     REP(i,s.size()){
      |         ^
a.cc:9:5: error: 'REP' was not declared in this scope
    9 |     REP(i,s.size()){
      |     ^~~
a.cc: In function 'int main()':
a.cc:23:7: error: 'i' was not declared in this scope
   23 |   REP(i,n){
      |       ^
a.cc:23:3: error: 'REP' was not declared in this scope
   23 |   REP(i,n){
      |   ^~~
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);
  }
  
  int M;
  cin >> M;
  vector<string> T(M);
  for (int i = 0; i < M; i++) {
    cin >> T.at(i);
  }
  
  vector<int> sum(N);
  for (int i = 0; i < N; i++) {
    string a = S.at(i);
    for (int j = 0; j < N; j++) {
      if (S.at(j) == a) {
        sum.at(i)++;
      }
      if (T.at(j) == a) {
        sum.at(i)--;
      }
    }
  }
  int max = std::max(sum);
  if (max > 0) {
    cout << max << endl;
  }
  else {
    cout << 0 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:21: error: no matching function for call to 'max(std::vector<int>&)'
   31 |   int max = std::max(sum);
      |             ~~~~~~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:31:21: note:   'std::vector<int>' is not derived from 'std::initializer_list<_Tp>'
   31 |   int max = std::max(sum);
      |             ~~~~~~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
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);
  }
  
  int M;
  cin >> M;
  vector<string> T(M);
  for (int i = 0; i < M; i++) {
    cin >> T.at(i);
  }
  
  vector<int> sum(N);
  for (int i = 0; i < N; i++) {
    string a = S.at(i);
    for (int j = 0; j < N; j++) {
      if (S.at(j) == a) {
        sum.at(i)++;
      }
      if (T.at(j) == a) {
        sum.at(i)--;
      }
    }
  }
  int max = max(sum);
  if (max > 0) {
    cout << max << endl;
  }
  else {
    cout << 0 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:16: error: 'max' cannot be used as a function
   31 |   int max = max(sum);
      |             ~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin >> n;
  vector<string> blue(n);
  vector<int> score(n);
  int max_score = 0;
  for (int i = 0;i<n;i++) cin >> blue.at(i);
  int red_n = 0;
  cin >> red_n;
  vector<string> red(red_n);
  for (int i = 0;i < red_n;i++) cin >> red.at(i);
  for (int i = 0;i < n;i++){
    int count = -1;
    for (int j = 0;j < n;j++){
      if (blue.at(i) == blue.at(j)) count++;
    }
    for (int j = 0;j < red_n;j++){
      if (blue.at(i) == red.at(j)) count--;
    }
    score.at(i) = count;
    max_score = max(max_score, count);
  }
  else cout << max_score << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:3: error: 'else' without a previous 'if'
   26 |   else cout << max_score << endl;
      |   ^~~~
Language: C

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <queue>
#include <tuple>
#include <cstring>

#define INF 100000000

using namespace std;

int main()
{
    int n;
    cin >> n;
    string s[n];
    for(int i = 0;i<n;i++)
    {
        cin >> s[i];
    }
    int m;
    cin >> m;
    string t[m];
    for(int i = 0;i<m;i++)
    {
        cin >> t[i];
    }
    int cnt,ans = 0;
    for(int i = 0;i<n;i++)
    {
        cnt = 0;
        for(int j = 0;j < n;j++)
        {
            if(s[i] == s[j])
            {
                cnt++;
            }
        }
        for(int j = 0;j<m;j++)
        {
            if(s[i] == t[j])
            {
                cnt--;
            }

        }
        ans = max(ans,cnt);
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
//#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 


signed main(){
  int n,m;cin>>n>>m;
  unordered_map<string,int> mp;
  rep(i,n){
    string a;cin>>a;mp[a]++;
  }
  rep(i,m){
    string a;cin>>a;mp[a]--;
  }
  int ans = 0;
  for(auto itr = m.begin();itr != m.end();itr++){
    ans = max(0, itr->second);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:20: error: request for member 'begin' in 'm', which is of non-class type 'int'
   23 |   for(auto itr = m.begin();itr != m.end();itr++){
      |                    ^~~~~
a.cc:23:37: error: request for member 'end' in 'm', which is of non-class type 'int'
   23 |   for(auto itr = m.begin();itr != m.end();itr++){
      |                                     ^~~
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
//#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int,int> fd[] = {make_pair(1,0),make_pair(-1,0),make_pair(0,1),make_pair(0,-1)}; 


signed main(){
  int n,m;string s[100];cin>>n;rep(i,n)cin>>s[i];cin>>m;
  unordered_map<string,bool> m;
  rep(i,m){
    string a;cin>>a;
    m.emplace(a,true);
  }
  int ans = 0;
  for(auto v : s){
    ans += m.count(v);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:30: error: conflicting declaration 'std::unordered_map<std::__cxx11::basic_string<char>, bool> m'
   15 |   unordered_map<string,bool> m;
      |                              ^
a.cc:14:9: note: previous declaration as 'int m'
   14 |   int n,m;string s[100];cin>>n;rep(i,n)cin>>s[i];cin>>m;
      |         ^
a.cc:18:7: error: request for member 'emplace' in 'm', which is of non-class type 'int'
   18 |     m.emplace(a,true);
      |       ^~~~~~~
a.cc:22:14: error: request for member 'count' in 'm', which is of non-class type 'int'
   22 |     ans += m.count(v);
      |              ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int n,m,count,max;
  cin>>n;
  vector<string> s(n);
  for(int i=0;i<n;i++)cin>>s.at(i);
  cin>>m;
  vector<string> t(m);
  for(int i=0;i<m;i++)cin>>t.at(i);
  max=0;
  
  for(int i=0;i<n;i++){
    for(int j=i;j<n;j++){
      if(s.at(i)==s.at(j))count++;
    }
    for(int j=0;j<m;j++){
      if(s.at(i)==t.at(j))count--;
    }
    ma=max(count,ma);
  }
  cout<<ma<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'ma' was not declared in this scope; did you mean 'max'?
   21 |     ma=max(count,ma);
      |     ^~
      |     max
a.cc:21:11: error: 'max' cannot be used as a function
   21 |     ma=max(count,ma);
      |        ~~~^~~~~~~~~~
a.cc:23:9: error: 'ma' was not declared in this scope; did you mean 'max'?
   23 |   cout<<ma<<endl;
      |         ^~
      |         max
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  int N;
  cin >> N;
  vector<string> data(N);
  for(int i = 0; i < N; i++) {
    cin >> data.at(i);
  }
  int M;
  cin >> M;
  string b;
  for(int i = 0; i < M; i++) {
    cin >> b;
    data.push_back(b);
  }
  string a;
  int ans = 0, count = 0;
  for(int i = 0; i < N; i++) {
    a = data.at(i);
    for(int j = 0; j < N - i - 1; j++) {
      if(strcmp(a, data.at(j + i)) == 0) count++;
    }
    for(int j = 0; j < M; j++) {
      if(strcmp(a, data.at(N + j)) == 0) count--;
    }
    if (count > ans) ans = count;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   22 |       if(strcmp(a, data.at(j + i)) == 0) count++;
      |                 ^
      |                 |
      |                 std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:25:17: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   25 |       if(strcmp(a, data.at(N + j)) == 0) count--;
      |                 ^
      |                 |
      |                 std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
Language: C++

#include <iostream>

#include <string>
#include <unordered_map>

int TwoColorsCardGame(void) {
	std::unordered_map<std::string, int> mymap;
	std::unordered_map<std::string, int>::iterator it;
	int N, M;
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = mymap.find(temp)) != mymap.end()) {
			mymap[temp] = it->second + 1;
		} else {
			mymap[temp] = 1;
		}
	}
	std::cin >> M;
	for (int i = 0; i < M; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = mymap.find(temp)) != mymap.end()) {
			mymap[temp] = it->second - 1;
		} else {
			mymap[temp] = -1;
		}
	}
	int max = 0;
	for (auto it = mymap.begin(); it != mymap.end(); ++it) {
		if (it->second > max) {
			max = it->second;
		}
	}
	std::cout << max;
	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

#include <string>
#include <map>

int TwoColorsCardGame(void) {
	std::map<std::string, int> map;
	std::map<std::string, int>::iterator it;
	int N, M;
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = it->second + 1;
		} else {
			map[temp] = 1;
		}
	}
	std::cin >> M;
	for (int i = 0; i < M; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = it->second - 1;
		} else {
			map[temp] = -1;
		}
	}
	int max = 0;
	for (auto it = map.begin(); it != map.end(); ++it) {
		if (it->second > max) {
			max = it->second;
		}
	}
	std::cout << max;
	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

#include <string>
#include <unordered_map>

int TwoColorsCardGame(void) {
	std::unordered_map<std::string, int> map;
	std::unordered_map<std::string, int>::iterator it;
	int N, M;
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = it->second + 1;
		} else {
			map[temp] = 1;
		}
	}
	std::cin >> M;
	for (int i = 0; i < M; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = it->second - 1;
		} else {
			map[temp] = -1;
		}
	}
	int max = 0;
	for (auto it = map.begin(); it != map.end(); ++it) {
		if (it->second > max) {
			max = it->second;
		}
	}
	std::cout << max;
	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

#include <string>
#include <unordered_map>

int TwoColorsCardGame(void) {
	std::unordered_map<std::string, int> map;
	std::unordered_map<std::string, int>::iterator it;
	int N, M;
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = it->second + 1;
		} else {
			map[temp] = 1;
		}
	}
	std::cin >> M;
	for (int i = 0; i < M; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = it->second - 1;
		} else {
			map[temp] = -1;
		}
	}
	int max = 0;
	for (auto it = map.begin(); it != map.end(); ++it) {
		if (*it->second > max) {
			max = it->second;
		}
	}
	std::cout << max;
	return 0;
}

Compiler output:
a.cc: In function 'int TwoColorsCardGame()':
a.cc:32:21: error: invalid type argument of unary '*' (have 'int')
   32 |                 if (*it->second > max) {
      |                     ^~~~~~~~~~~
Language: C++

#include <iostream>

#include <string>
#include <unordered_map>

int TwoColorsCardGame(void) {
	std::unordered_map<std::string, int> map;
	std::unordered_map<std::string, int>::iterator it;
	int N, M;
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = *it->second + 1;
		} else {
			map[temp] = 1;
		}
	}
	std::cin >> M;
	for (int i = 0; i < M; i++) {
		std::string temp;
		std::cin >> temp;
		if ((it = map.find(temp)) != map.end()) {
			map[temp] = *it->second - 1;
		} else {
			map[temp] = -1;
		}
	}
	int max = 0;
	for (auto it = map.begin(); it != map.end(); ++it) {
		if (*it->second > max) {
			max = *it->second;
		}
	}
	std::cout << max;
	return 0;
}

Compiler output:
a.cc: In function 'int TwoColorsCardGame()':
a.cc:15:37: error: invalid type argument of unary '*' (have 'int')
   15 |                         map[temp] = *it->second + 1;
      |                                     ^~~~~~~~~~~
a.cc:25:37: error: invalid type argument of unary '*' (have 'int')
   25 |                         map[temp] = *it->second - 1;
      |                                     ^~~~~~~~~~~
a.cc:32:21: error: invalid type argument of unary '*' (have 'int')
   32 |                 if (*it->second > max) {
      |                     ^~~~~~~~~~~
a.cc:33:31: error: invalid type argument of unary '*' (have 'int')
   33 |                         max = *it->second;
      |                               ^~~~~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>

char list[200][11], p = 0;
int check(char *s){
  int i;
  for (i = 0; i < p; i++){
    if(strcmp(list[i], s) == 0){
      return i;
    }
  }
  strcpy(list[i], s);
  p = i;
  return i;
}

int main(){
  int N, M, count[200] = {0}, max = -100, q;
  char s[100][11], t[100][11];
  
  scanf("%d", &N);
  for (int i = 0; i < N; i++){
    scanf("%s",s[i]);
    count[check(s[i])]++;
  }
  scanf("%d", &M);
  for (int i = 0; i < M; i++){
    scanf("%s",t[i]);
    count[check(t[i])]--;
  }
  
  for (i = 0; i < 200; i++){
    if(max < count[i]){
      max = count[i];
    }
  }
  
  printf("%d\n", max);
  
  return 0;
}
  

Compiler output:
main.c: In function 'main':
main.c:32:8: error: 'i' undeclared (first use in this function)
   32 |   for (i = 0; i < 200; i++){
      |        ^
main.c:32:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>

char list[200][11], p = 0;
int check(char *s){
  int i;
  for (i = 0; i < p; i++){
    if(strcmp(list[i], s) == 0){
      return i;
    }
  }
  strcpy(list[i], s);
  p = i;
  return i;

int main(){
  int N, M, count[200] = {0}, max = -100, q;
  char s[100][11], t[100][11];
  
  scanf("%d", &N);
  for (int i = 0; i < N; i++){
    scanf("%s",s[i]);
    count[check(s[i])]++;
  }
  scanf("%d", &M);
  for (int i = 0; i < M; i++){
    scanf("%s",t[i]);
    count[check(t[i])]--;
  }
  
  for (i = 0; i < 200; i++){
    if(max < count[i]){
      max = count[i];
    }
  }
  
  printf("%d\n", max);
  
  return 0;
}
  

Compiler output:
main.c: In function 'check':
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>

char list[200][11], p = 0;
int check(char *s){
  int i;
  for (i = 0; i < p; i++){
    if(strcmp(list[i], p) == 0){
      return i;
    }
  }
  strcpy(list[i], s);
  p = i;
  return i;

int main(){
  int N, M, count[200] = {0}, max = -100, q;
  char s[100][11], t[100][11];
  
  scanf("%d", &N);
  for (int i = 0; i < N; i++){
    scanf("%s",s[i]);
    count[check(s[i])]++;
  }
  scanf("%d", &M);
  for (int i = 0; i < M; i++){
    scanf("%s",t[i]);
    count[check(t[i])]--;
  }
  
  for (i = 0; i < 200; i++){
    if(max < count[i]){
      max = count[i];
    }
  }
  
  printf("%d\n", max);
  
  return 0;
}
  

Compiler output:
main.c: In function 'check':
main.c:8:24: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    8 |     if(strcmp(list[i], p) == 0){
      |                        ^
      |                        |
      |                        char
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^
Language: C++

#include <string>
#include <map>
using namespace std;

const int MAX_NUM = 100;

int main()
{
	map<string, int> blue;
	map<string, int> red;
	map<string, int>::iterator iter;

	int N;
	cin >> N;
	string blue_str[MAX_NUM];
	for ( int i = 0; i < N; ++i ) {
		cin >> blue_str[i];
	}

	for ( int i = 0; i < N; ++i ) {
		if ( ( iter = blue.find( blue_str[i] ) ) != blue.end() ) {
			++(iter->second);
		}
		else {
			blue.insert( make_pair( blue_str[i], 1 ) );
		}
	}

	int M;
	cin >> M;
	string red_str[MAX_NUM];
	for ( int i = 0; i < M; ++i ) {
		cin >> red_str[i];
	}

	for ( int i = 0; i < M; ++i ) {
		if ( ( iter = red.find( red_str[i] ) ) != red.end() ) {
			++(iter->second);
		}
		else {
			red.insert( make_pair( red_str[i], 1 ) );
		}
	}

	int res = 0;
	int score;
	map<string, int>::iterator b_iter, r_iter;
	for ( b_iter = blue.begin(); b_iter != blue.end(); ++b_iter ) {
		score = b_iter->second;
		if ( ( r_iter = red.find( b_iter->first ) ) != red.end() ) {
			score -= r_iter->second;
		}

		if ( res < score ) res = score;
	}

	cout << res << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'cin' was not declared in this scope
   14 |         cin >> N;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <map>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:57:9: error: 'cout' was not declared in this scope
   57 |         cout << res << endl;
      |         ^~~~
a.cc:57:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:57:24: error: 'endl' was not declared in this scope
   57 |         cout << res << endl;
      |                        ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <map>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

#include <vector>
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <numeric>
using namespace std;

int main(){
    int n,m,a=0;
    cin >> n;
    vector<string>s(n);
    for(int i=0;i<n;i++){
        cin >> s[i];
    }
    cin >> m;
    vector<string>t(m);
    for(int i=0;i<m;i++){
        cin >> t[i];
    }
    for(int i=0;i<n;i++){    
        a=max((count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i])),a);
    }
    cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: no matching function for call to 'max(std::__iterator_traits<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >, void>::difference_type, int&)'
   22 |         a=max((count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i])),a);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:22:14: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   22 |         a=max((count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i])),a);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:22:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   22 |         a=max((count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i])),a);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <vector>
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <numeric>
using namespace std;

int main(){
    int n,m,a=0;
    cin >> n;
    vector<string>s(n);
    for(int i=0;i<n;i++){
        cin >> s[i];
    }
    cin >> m;
    vector<string>t(m);
    for(int i=0;i<m;i++){
        cin >> t[i];
    }
    for(int i=0;i<n;i++){    
        a=max(count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i]),a);
    }
    cout << a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: no matching function for call to 'max(std::__iterator_traits<__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >, void>::difference_type, int&)'
   22 |         a=max(count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i]),a);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:22:14: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   22 |         a=max(count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i]),a);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:22:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   22 |         a=max(count(s.begin(),s.end(),s[i])-count(t.begin(),t.end(),s[i]),a);
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
#include <string>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#include <climits>
#include <bitset>
#include <array>
#include <deque>
#include <queue>
#include <map>
#define all(x) (x).begin(),(x).end()

void solve(){

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

    for (int i = 0;  i < N; i++){
        m[s[i]]++;
    }
    for (int i = 0; i < M; i++){
        m[t[i]]--;
    }
    maxv = m.rbegin() -> second;
    if (maxv < 0){
        cout << 0 << endl;
    } else {
        cotu << maxv << endl;
    }
    



    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:5: error: 'maxv' was not declared in this scope
   45 |     maxv = m.rbegin() -> second;
      |     ^~~~
a.cc:49:9: error: 'cotu' was not declared in this scope
   49 |         cotu << maxv << endl;
      |         ^~~~
Language: Java

import java.util.HashMap;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int n = sc.nextInt();
        String[] ss = new String[n];
        HashMap<String, Integer> sMap = new HashMap<>();
        for (int i = 0; i < n; i++) {
            String key = sc.next();
            sMap.put(key, sMap.getOrDefault(key, 0) + 1);
        }
        int m = sc.nextInt();
        for (int i = 0; i < m; i++) {
            String key = sc.next();
            sMap.put(key, sMap.getOrDefault(key, 0) - 1);
        }
        int max = Collections.max(sMap.values());
        System.out.println(Math.Max(max, 0));
    }
}

Compiler output:
Main.java:24: error: cannot find symbol
        int max = Collections.max(sMap.values());
                  ^
  symbol:   variable Collections
  location: class Main
Main.java:25: error: cannot find symbol
        System.out.println(Math.Max(max, 0));
                               ^
  symbol:   method Max(int,int)
  location: class Math
2 errors
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define VRSORT(v) sort(v.rbegin(), v.rend());//vectorの降順ソート
#define ll long long
#define pb(a) push_back(a)
#define INF 1000000000
#define OUT(x) cout << x << endl
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};

int max_value(std::map<string, int> m) {
  int max = 0;
  for (std::map<string, int>::iterator it = m.begin(); it != m.end(); it++) {
    if (max < it->second) max = it->second;
  }
  return max;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,m;
    cin >> n;
    map<string,int> map;
    REP(i,n){
        string s;
        cin >> s;
        if(map.count(s)) map[s]+=1;
        else map.insert(make_pair(s,1))
    }
    cin >> m
    REP(i,m){
        string s;
        cin >> s;
        if(map.count(s)) map[s]-=1;
        else map.insert(make_pair(s,-1))
    }
    int max_yen = max_value(map);
    if(max_yen>0) cout << max_yen << endl;
    else cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:40: error: expected ';' before '}' token
   40 |         else map.insert(make_pair(s,1))
      |                                        ^
      |                                        ;
   41 |     }
      |     ~                                   
a.cc:42:13: error: expected ';' before 'for'
   42 |     cin >> m
      |             ^
      |             ;
a.cc:43:9: error: 'i' was not declared in this scope
   43 |     REP(i,m){
      |         ^
a.cc:2:33: note: in definition of macro 'REP'
    2 | #define REP(i, n) for(int i = 0;i < n;i++)
      |                                 ^
Language: C++

#include<iostream>
#include<algorithm>
#include<map>
#include<set>
#include<vector>
using namespace std;
using ll = long long;
using lli = long long int;
ll MM = 1000000000;
ll mod = MM + 7;
#define INF (ll)1e18
int main(){
    int n; cin >> n;
    string s;
    map<string, int> mp;

    for(int i = 0; i < n; i++){
        cin >> s;
        mp[s]++;
    }
    int m; cin >> m;
    for(int i = 0; i < m; i++){
        cin >> s;
        mp[s]--;
    }
    int ans = 0; 
    for(auto e: blue){
        ans = max(ans, (e.second - red[e.first]));
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: 'blue' was not declared in this scope
   27 |     for(auto e: blue){
      |                 ^~~~
a.cc:28:36: error: 'red' was not declared in this scope
   28 |         ans = max(ans, (e.second - red[e.first]));
      |                                    ^~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;

int main() {
  int n; cin >> n;
  vector<string> blue(n); for(int i = 0; i < n; i++) cin >> blue[i];
  int m; cin >> m;
  vector<string> red(m); for(int i = 0; i < n; i++) cin >> red[i];
  int ans = 0, cntn=0, cntm=0;
  auto calc = [&](string s) {
    int buf = 0;
    for(string t: blue) {
      if( t == s ) buf++;
    }
    for(string t: red) {
      if( t == s ) buf--;
    }
    return buf;
  };

  for(strint t: blue) {
    ans = max(ans, calc(t));
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:7: error: 'strint' was not declared in this scope; did you mean 'stdin'?
   24 |   for(strint t: blue) {
      |       ^~~~~~
      |       stdin
a.cc:28:3: error: expected primary-expression before 'return'
   28 |   return 0;
      |   ^~~~~~
a.cc:27:23: error: expected ')' before 'return'
   27 |   cout << ans << endl;
      |                       ^
      |                       )
   28 |   return 0;
      |   ~~~~~~               
a.cc:24:6: note: to match this '('
   24 |   for(strint t: blue) {
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  string s;
  cin>>n;
  map<string,int> mp;
  for(int i=0;i<n;i++){
    cin>>s;
    mp[s]++;
  }
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>s;
    mp[s]--;
  }
  int c=0;
  for(auto a:mp){
    c=max(c,a);
  }
  cout<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: no matching function for call to 'max(int&, std::pair<const std::__cxx11::basic_string<char>, int>&)'
   19 |     c=max(c,a);
      |       ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:19:10: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'std::pair<const std::__cxx11::basic_string<char>, int>')
   19 |     c=max(c,a);
      |       ~~~^~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:19:10: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   19 |     c=max(c,a);
      |       ~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,M;
  cin >> N;
  vector <string> a(N);
  for(int i=0;i<N;i++){
    cin >> a.at(N); 
  }  
  cin >> M;
  vector <string> b(M);
  for(int i=0;i<M;i++){
    cin >> b.at(i);
  }  
   
  int res=0;
  for(int i=0;i<N;i++){
  int r=0;  
    for(int j=0;j<N;j++){
      if(a.at(i)==a.at(j))r++;
    } 
    for(int k=0;k<M;k++){
      if(a.at(i)==b.at(j))r--;
    }  
  res=max(res,r);  
  }  
     cout << res;
  
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: 'j' was not declared in this scope
   24 |       if(a.at(i)==b.at(j))r--;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N,M;
  cin >> N;
  vector <string> a(N);
  for(int i=0;i<N;i++){
    cin >> a(N); 
  }  
  cin >> M;
  vector <string> b(M);
  for(int i=0;i<M;i++){
    cin >> b.at(i);
  }  
   
  int res=0;
  for(int i=0;i<N;i++){
  int r=0;  
    for(int j=0;j<N;j++){
      if(a.at(i)==a.at(j))r++;
    } 
    for(int k=0;k<M;k++){
      if(a.at(i)==b.at(j))r--;
    }  
  res=max(res,r);  
  }  
     cout << res;
  
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
    9 |     cin >> a(N);
      |            ~^~~
a.cc:24:24: error: 'j' was not declared in this scope
   24 |       if(a.at(i)==b.at(j))r--;
      |                        ^
Language: C++

#include <bits/stdc++.h>
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;

int main(){
  int n;cin>>n;
  unordered_map<string,int> l;
  rep(i,n){
    string s;cin>>s;
    l[s]++;
  }
  int m;cin>>m;
  rep(i,n){
    string s;cin>>s;
    l[s]--;
  }
  int ans = 0;
  for(auto itr = l.begin();itr!=l.end();itr++){
    ans = max(ans,itr->second
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:30: error: expected ')' before '}' token
   24 |     ans = max(ans,itr->second
      |              ~               ^
      |                              )
   25 |   }
      |   ~
Language: C++

using namespace std;

int main(){
        int N,M,i,max=0;string s;
        map<string, int> mp;
        cin>>N;
        for(i=0;i<N;i++){
                cin>>s;
                mp[s]++;
        }
        cin>>M;
        for(i=0;i<M;i++){
                cin>>s;
                mp[s]--;
        }

        for(auto const& [k,v]:mp) max=max<v?v:max;

        cout<<max;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:25: error: 'string' was not declared in this scope
    4 |         int N,M,i,max=0;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 | using namespace std;
a.cc:5:9: error: 'map' was not declared in this scope
    5 |         map<string, int> mp;
      |         ^~~
a.cc:1:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
  +++ |+#include <map>
    1 | using namespace std;
a.cc:5:21: error: expected primary-expression before 'int'
    5 |         map<string, int> mp;
      |                     ^~~
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>N;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:8:22: error: 's' was not declared in this scope
    8 |                 cin>>s;
      |                      ^
a.cc:9:17: error: 'mp' was not declared in this scope
    9 |                 mp[s]++;
      |                 ^~
a.cc:13:22: error: 's' was not declared in this scope
   13 |                 cin>>s;
      |                      ^
a.cc:14:17: error: 'mp' was not declared in this scope
   14 |                 mp[s]--;
      |                 ^~
a.cc:17:31: error: 'mp' was not declared in this scope
   17 |         for(auto const& [k,v]:mp) max=max<v?v:max;
      |                               ^~
a.cc:19:9: error: 'cout' was not declared in this scope
   19 |         cout<<max;
      |         ^~~~
a.cc:19:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  map<string, int> counter;
  
  int n;
  cin >> n;
  vector<string> plus(n);
  for (string a:plus)
  {
    cin >> a;
    
    counter[a] = counter[a] +1;
  }
  
  
  int m;
  cin >> m;
  vector<string> minus(m);
  for (string b:plus)
  {
    cin >> b;
  counter[b] = counter[b]-1;
  
  int Max = 0;
  
  map <string, int> :: iterator it;
  for( it = counter.begin(); it != counter.end(); ++it)
  {
  if (it ->second > Max)
  Max = it->second;
  }
  cout << Max << endl;
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  map<string, int> counter;
  
  int n;
  cin >> n;
  vector<string> plus(n);
  for (string a:plus)
  {
    cin >> a;
    
    if(counter.count(a) == 0)
      counter.insert(pair <string, int> (a, 1));
    else
      counter.insert(pair <string, int> (a, counter.count(a)+1));
  }
  
  
  int m;
  cin >> m;
  vector<string> minus(m);
  for (string b:plus)
  {
    cin >> b;
  if(counter.count(b) == 0)
      counter.insert(pair <string, int> (b, -1));
    else
      counter.insert(pair <string, int> (b, counter.count(b)-1));
  }
  
  counter.value_comp();
  if( counter.end()->secnd < 0)
    cout << 0 << endl;
  else
    cout << counter.end()->second << endl;
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:22: error: 'struct std::pair<const std::__cxx11::basic_string<char>, int>' has no member named 'secnd'; did you mean 'second'?
   34 |   if( counter.end()->secnd < 0)
      |                      ^~~~~
      |                      second
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  map<string, int> counter;
  
  int n;
  cin >> n;
  vector<string> plus(n);
  for (string a:plus)
  {
    cin >> a;
    
    if(counter.count(a) == 0)
      counter.insert(pair <string, int> (a, 1));
    else
      counter.insert(pair <string, int> (a, counter.count(a)+1));
  }
  
  
  int m;
  cin >> m;
  vector<string> minus(m);
  for (string b:plus)
  {
    cin >> b;
  if(counter.count(b) == 0)
      counter.insert(pair <string, int> (b, -1));
    else
      counter.insert(pair <string, int> (b, counter.count(a)-1));
  }
  
  counter.value_comp();
  if( counter.end()->secnd < 0)
    cout << 0 << endl;
  else
    cout << counter.end()->second << endl;
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:59: error: 'a' was not declared in this scope
   30 |       counter.insert(pair <string, int> (b, counter.count(a)-1));
      |                                                           ^
a.cc:34:22: error: 'struct std::pair<const std::__cxx11::basic_string<char>, int>' has no member named 'secnd'; did you mean 'second'?
   34 |   if( counter.end()->secnd < 0)
      |                      ^~~~~
      |                      second