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

#include<bits/stdc++.h>


using namespace std;
 
int main(){
    int N,M;
    vector<string> blue(N);
    vector<String> red(N);
    cin >> N;
    for(int i = 0;i < N;i++){
        cin >> blue[i];
    }
    cin >> M;
    for(int i = 0;i < M;i++){
        cin >> red[i];
    }

    map<string,int> p;

    for(int i = 0; i < N; i++){
        p[blue[i]] += 1;
    }

    for(int i = 0; i < N; i++){
        p[red[i]] -= 1;
    }
    int max = 0;
    for(int i = 0; i < N; i++){
        if(max < p[blue[i]]) max = p[blue[i]];
    }

    for(int i = 0; i < N; i++){
        if(max < p[red[i]]) max = p[red[i]];
    }

    cout << max;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'String' was not declared in this scope
    9 |     vector<String> red(N);
      |            ^~~~~~
a.cc:9:18: error: template argument 1 is invalid
    9 |     vector<String> red(N);
      |                  ^
a.cc:9:18: error: template argument 2 is invalid
a.cc:16:19: error: invalid types 'int[int]' for array subscript
   16 |         cin >> red[i];
      |                   ^
a.cc:26:14: error: invalid types 'int[int]' for array subscript
   26 |         p[red[i]] -= 1;
      |              ^
a.cc:34:23: error: invalid types 'int[int]' for array subscript
   34 |         if(max < p[red[i]]) max = p[red[i]];
      |                       ^
a.cc:34:40: error: invalid types 'int[int]' for array subscript
   34 |         if(max < p[red[i]]) max = p[red[i]];
      |                                        ^
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<string> blue(N); 
  for(int i = 0;i < N;i++){ //blueに入力
    cin >> blue.at(i);
  }
  
  int M;
  cin >> M;
  vector<string> red(M);
  for(int i = 0;i < M;i++){ //redに入力
    cin >> red.at(i);
  }
  
  
  int profit = 0;
  for(int i = 0;i < N + M;i++){
    string testcode;
    if(i < N){testcode = blue.at(i);}
    else{testcode = red.at(i - N);}
    int p = 0;          
    for(int j = 0;j < N;j++){if(testcode == blue.at(j)){p++;}}
    for(int k = 0;k < M;k++){if(testcode == red.at(k)){p--;}}
    if(profit < p){profit = p;}
    }
   }
  cout << profit << endl;
}

Compiler output:
a.cc:31:3: error: 'cout' does not name a type
   31 |   cout << profit << endl;
      |   ^~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

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

int main(){
  int N,M;
  vector<string> blue(N);
  vector<string> red(M);
  
  for(int i = 0;i < N;i++){
    cin >> blue.at(i);
  }
  
  for(int i = 0;i < M;i++){
    cin >> red.at(i);
  }
  
//青ver    
  for(int i = 0;i < N;i++){  
    int profit = 0;
    int p = 0;
    for(int j = 0;j < N;j++){
      if(blue.at(i) == blue.at(j)){
        p++;
      }
    }
    for(int k = 0;k < M;k++){
      if(blue.at(i) == red.at(k)){
        p--;
      }
    }
    if(profit < p)profit = p;
  }
  
//赤ver  
    for(int i = 0;i < M;i++){
    int profit = 0;
    int p = 0;
    for(int j = 0;j < M;j++){
      if(red.at(i) == red.at(j)){
        p++;
      }
    }
    for(int k = 0;k < N;k++){
      if(red.at(i) == blue.at(k)){
        p--;
      }
    }
    if(profit < p)profit = p;
  }
  
  cout << profit << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:11: error: 'profit' was not declared in this scope; did you mean 'profil'?
   51 |   cout << profit << endl;
      |           ^~~~~~
      |           profil
Language: C++

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

int main(){
  int N,M;
  vector<string> blue(N);
  vector<string> red(M);
  
  for(int i = 0;i < N;i++){
    string s;
    cin >> s
    blue.at(i) = s;  
  }
  
  for(int i = 0;i < M;i++){
    string s;
    cin >> s
    red.at(i) = s;  
  }
  
  int profit = 0;
  for(int i = 0;i < N;i++){
    int p = 0;
    for(int j = 0;j < N;j++){
      if(blue.at(i) == blue.at(j)){
        p++;
      }
    }
    for(int k = 0;k < M;k++){
      if(blue.at(i) == red.at(k)){
        p--;
      }
    }
    if(profit < p)profit = p;
  }

  
  
  
    for(int i = 0;i < M;i++){
    int p = 0;
    for(int j = 0;j < M;j++){
      if(red.at(i) == red.at(j)){
        p++;
      }
    }
    for(int k = 0;k < N;k++){
      if(red.at(i) == blue.at(k)){
        p--;
      }
    }
    if(profit < p)profit = p;
  }
  
  cout << profit << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before 'blue'
   11 |     cin >> s
      |             ^
      |             ;
   12 |     blue.at(i) = s;
      |     ~~~~     
a.cc:17:13: error: expected ';' before 'red'
   17 |     cin >> s
      |             ^
      |             ;
   18 |     red.at(i) = s;
      |     ~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n;
  vector<string> b(n);
  rep(i, n) cin >> b[i];
  cin >> m;
  vector<string> a(m);
  rep(i, m) cin >> a[i];
  map<string, int> ma;
  rep(i, n){
    if(ma.count(b[i])) ++ma[b[i]];
    else ma[b[i]] = 1;
  }
  rep(i, m){
    if(ma.count(a[i])) --ma[a[i]];
    else ma[a[i]] = -1;
  }
  priority_queue<int> pq;
  for(auto p: ma) pq.push(p.second);
  cout << pq.top() << endl
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:27: error: expected ';' before 'return'
   25 |   cout << pq.top() << endl
      |                           ^
      |                           ;
   26 |   return 0;
      |   ~~~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n;
  vector<string> b(n);
  rep(i, n) cin >> b[i];
  cin >> m;
  vector<string> a(m);
  rep(i, m) cin >> a[i];
  map<string, int> ma;
  rep(i, n){
    if(ma.count(b[i])) ++ma[b[i]];
    else ma[b[i]] = 1;
  }
  rep(i, m){
    if(ma.count(a[i])) --ma[a[i]];
    else ma[a[i]] = -1;
  }
  priority_queue<int> pq;
  for(auto p: ma) pq.push(p.second);
  cout << pq.front() << endl
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: 'class std::priority_queue<int>' has no member named 'front'
   25 |   cout << pq.front() << endl
      |              ^~~~~
Language: C++

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

void fnInput(mpa<string, int>& rmpScore)
{
  int nBluelSiz;
  cin >> nBluelSiz;

  for (int i = 0; i < nBluelSiz; i++)
  {
    string sBlueStr;
    cin >> sBlueStr;
    rmpScore[sBlueStr]++;
  }

  int nRedSiz;
  cin >> nRedSiz;

  for (int i = 0; i < nRedSiz; i++)
  {
    string sRedStr;
    cin >> sRedStr;
    rmpScore[sRedStr]--;
  }
}

int fnScoreCheck(const map<string, int>& cnrmpScore)
{
  int nMaxScore = 0;
  for (pair<const string, int> PScore : cnrmpScore)
    nMaxScore = max(nMaxScore, PScore.second);

  return nMaxScore;
}

int main()
{
  map<string, int> mpScore;

  fnInput(mpScore);
  cout << fnScoreCheck(mpScore) << endl;

  return 0;
}

Compiler output:
a.cc:4:6: error: variable or field 'fnInput' declared void
    4 | void fnInput(mpa<string, int>& rmpScore)
      |      ^~~~~~~
a.cc:4:14: error: 'mpa' was not declared in this scope
    4 | void fnInput(mpa<string, int>& rmpScore)
      |              ^~~
a.cc:4:24: error: expected primary-expression before ',' token
    4 | void fnInput(mpa<string, int>& rmpScore)
      |                        ^
a.cc:4:26: error: expected primary-expression before 'int'
    4 | void fnInput(mpa<string, int>& rmpScore)
      |                          ^~~
a.cc: In function 'int main()':
a.cc:40:3: error: 'fnInput' was not declared in this scope
   40 |   fnInput(mpScore);
      |   ^~~~~~~
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[i];
  int M;
  cin >> M;
  vector<string> t(M);
  for (int i = 0; i < N; i++) cin >> t[i];
  vector<pair<string,int>> S;
  set<string> S2;
  for (int i = 0; i < N; i++){
    if (S2.count(s[i])){
      for (int j = 0; j < S.size(); j++){
        if (S[j].first == s[i]) S[j].second++;
      }
    } else {
      S.push_back(make_pair(s[i],1));
      S2.insert(s[i]);
    }
  }
  for (int i = 0; i < M; i++){
    if (S2.count(t[i])){
      for (int j = 0; j < S.size(); j++){
        if (S[j].first == t[i]) S[j].second--;
      }
  }
  int res = 0;
  for (int i = 0; i < S.size(); i++) res = max(res,S[i].second);
  cout << res;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main()
{
	int N;
	int M;
	int answer = 0;
	
	cin >> N;
	string s[N];
	for (int i = 0; i < N; i++) { cin >> s[i]; }

	cin >> M;
	string t[M];
	for (int k = 0; k < M; k++) { cin >> t[k]; }
	

	// s[]を検索
	for (int i = 0; i < N; i++) {

		// i以外を検索
		for (int j = 0; j < N; j++) {
			
			if (i != j) {
				if (s[i] == s[j]) {
					answer++;
				}
			}
		
		}
		
		// t[]を検索
		for (int k = 0; k < M; k++) {
			if (s[i] == s[j]) {
				answer--;
			}
		}
	}

	cout << answer << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:39: error: 'j' was not declared in this scope
   35 |                         if (s[i] == s[j]) {
      |                                       ^
Language: C++

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

int main() {
  int N,M;
  cin >> N;
  vector<string> s(N);
  
  for(int i = 0; i < s.size(); i++){
    cin >> s.at(i);
  }
  
  cin >> M;
  vector<string> t(M);
  for(int i = 0; i < t.size(); i++){
    cin >> t.at(i);
  }
  
  // 同じ文字列が何個あるか数えて、配列に格納
  vector<int> cnt(N);
  for(int i = 0; i < s.size(); i++){
    for(int j = 0; j < s.size(); j++){      
      if(s.at(i) == s.at(j)){
        cnt.at(i)++;
      }
    }
    
    for(int j = 0; j < t.size(); j++){
      if(s.at(i) == t.at(j)){
        cnt.at(i)--;
      }
    }
  }
  
  // 
  for(int i = 0; i < cnt.size(); i++){
    if(ans < cnt.at(i)){
      ans = cnt.at(i);
    }
  }
  
  if(ans < 0){
    cout << 0 << endl;
  }else{
    cout << ans << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |     if(ans < cnt.at(i)){
      |        ^~~
      |        abs
a.cc:42:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
   42 |   if(ans < 0){
      |      ^~~
      |      abs
Language: C++

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

int main() {

int N,M,ans;
  string k;
  cin>>N>>M;
  vector<string> A(N);
  map<string,int> map;
  for(int i=0;i<N;i++){
    cin>>A.at(i); 
    map.count(A.at(i)) ? map[A>at(i)]++ : map[A.at(i)]=1;}
      for(int i=0;i<M;i++){
    cin>>k;
    map.count(k) ? map[k]-- : map[k]=-1;}
for(int i=0; i<N; i++){
  if(ans<map[A.at(i)]) ans=map[A.at(i)];}
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:32: error: 'at' was not declared in this scope
   13 |     map.count(A.at(i)) ? map[A>at(i)]++ : map[A.at(i)]=1;}
      |                                ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:25:24: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   25 |       if(sn.at(i) == tm(j))
      |                      ~~^~~
Language: C++

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

int main() {
  int N, M;
  string s[101], t[101];

  cin >> N;
  for(int i=0; i<N; ++i) cin >> s[i];
  cin >> M;
  for(int i=0; i<M; ++i) cin >> t[i];
  
  int max = 0;
  for(int i=0; i<N; ++i){
    string word = s[i];
    int p = 0;
    for(int j=0; j<N; ++j) if(tmp == s[j]) p++;
    for(int k=0; k<M; ++k) if(tmp == s[k]) p--;
    if(p > max) max = p;
  }
  
  cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   17 |     for(int j=0; j<N; ++j) if(tmp == s[j]) p++;
      |                               ^~~
      |                               tm
a.cc:18:31: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   18 |     for(int k=0; k<M; ++k) if(tmp == s[k]) p--;
      |                               ^~~
      |                               tm
Language: C++

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

int main() {
  int N, M;
  string s[101], t[101];

  cin >> N;
  for(int i=0; i<N; ++i) cin >> s[i];
  cin >> M;
  for(int i=0; i<M; ++i) cin >> t[i];
  
  int max = 0;
  for(int i=0; i<N; ++i){
    string word = s[i];
    int p = 0;
    for(int j=0; j<N; ++j) if(tmp == s[j]) p++;
    for(int k=0; k<M; ++k) if(tmp == s[k]) p--;
    if(p > max) max = p;
  }
  
  cout << max << endl;
}

Compiler output:
a.cc:1:10: fatal error: bits.stdc++.h: No such file or directory
    1 | #include <bits.stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  int N, M, x=0;
  string str;
  cin >> N;
  vector<string> vec(100);
  vector<int> vec2(100);
  for(int i=0; i<N; i++){
  	cin >> str;
  	for(int j=0; j<=x; j++){
  	  if(str == vec.at(j)){
  	    vec2.at(j)++;
  	    break;
  	  }
  	  if(j==x){
  	    vec.at(x)=str;
  	    vec2.at(x)++;
  	    x++;
  	    break;
  	  }
  	}
  }
  cin >> M;
  for(int i=0; i<M; i++){
  	cin >> str;
  	for(int j=0; j<=x; j++){
  	  if(str == vec.at(j)){
  	    vec2.at(j)--;
  	    break;
  	  }
  	  if(j==x){
  	    vec.at(x)=str;
  	    vec2.at(x)--;
  	    x++;
  	    break;
  	  }
  	}
  }
  
  sort(vec2.begin(),vec2.end());
  reverse(vec.begin(),vec2.end());
  
  cout << vec2.at(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:10: error: no matching function for call to 'reverse(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<int>::iterator)'
   43 |   reverse(vec.begin(),vec2.end());
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:1083:5: note: candidate: 'template<class _BIter> void std::reverse(_BIter, _BIter)'
 1083 |     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1083:5: note:   template argument deduction/substitution failed:
a.cc:43:10: note:   deduced conflicting types for parameter '_BIter' ('__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
   43 |   reverse(vec.begin(),vec2.end());
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note: candidate: 'template<class _ExecutionPolicy, class _BidirectionalIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator)'
  249 | reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last);
      | ^~~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:249:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

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

int main() {
  int N, M, x=0;
  string str;
  cin >> N;
  vector<string> vec(100);
  vector<int> vec2(100);
  for(int i=0; i<N; i++){
  	cin >> str;
  	for(int j=0; j<=i; j++){
  	  if(str == vec.at(j)){
  	    vec2.at(j)++;
  	    break;
  	  }
  	  if(j==i){
  	    vec.at(x)=str;
  	    vec2.at(x)++;
  	    x++;
  	  }
  	}
  }
  cin >> M;
  for(int i=0; i<M; i++){
  	cin >> str;
  	for(int j=0; j<=i; j++){
  	  if(str == vec.at(j)){
  	    vec2.at(j)--;
  	    break;
  	  }
  	  if(j==i){
  	    vec.at(x)=str;
  	    vec2.at(x)--;
  	    x++;
  	  }
  	}
  }
  
  sort(vec2.begin(),vec2.end());
  reverce(vec2.begin(),vec2.end());
  
  cout << vec2.at(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:3: error: 'reverce' was not declared in this scope
   41 |   reverce(vec2.begin(),vec2.end());
      |   ^~~~~~~
Language: Java

import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] n1 = new String[N];
 
   for(int i=0;i<N;i++) n1[i]= sc.next();
   
   int M = sc.nextInt();
   String[] m1 = new String[N];
 
   for(int i=0;i<M;i++) m1[i]= sc.next();
   int ans =0;
   int count =0;
   for(int i=0;i<N;i++)
   {
     count =0;
     for(int k=0;k<i;k++)
     {
       if(n1[i].equals(n1[k])) count++;
     }
     for(int k=i+1;k<N;k++)
     {
       if(n1[i].equals(n1[k])) count++;       
     }
     for(int k=0;k<M;k++)
     {
       if(n1[i].equals(n2[k])) count--;       
     }
     if(ans <count )ans = count;
   }
 
   System.out.println(ans);
 }
}

Compiler output:
Main.java:29: error: cannot find symbol
       if(n1[i].equals(n2[k])) count--;       
                       ^
  symbol:   variable n2
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int N = sc.nextInt();
   String[] n1 = new String[N];
 
   for(int i=0;i<N;i++) n1[i]= sc.next();
   
   int M = sc.nextInt();
   String[] m1 = new String[N];
 
   for(int i=0;i<M;i++) m1[i]= sc.next();
   int ans =0;
   int count =0;
   for(int i=0;i<N;i++)
   {
     count =0;
     for(int k=0;k<i;k++)
     {
       if(n1[i].equals(n1[k]) count++;
     }
     for(int k=i+1;k<N;k++)
     {
       if(n1[i].equals(n1[k]) count++;       
     }
     for(int k=0;k<M;k++)
     {
       if(n1[i].equals(n2[k]) count--;       
     }
     if(ans <count )ans = count;
   }
 
   System.out.println(ans);
 }
}

Compiler output:
Main.java:21: error: ')' expected
       if(n1[i].equals(n1[k]) count++;
                             ^
Main.java:25: error: ')' expected
       if(n1[i].equals(n1[k]) count++;       
                             ^
Main.java:29: error: ')' expected
       if(n1[i].equals(n2[k]) count--;       
                             ^
3 errors
Language: C++

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

int main() {
  int m;
  cin >> m;
  vector<string> blueCards(m);
  for(int i = 0; i < m; i++) {
    cin >> blueCards.at(i);
  }
  int n;
  cin >> n;
  vector<string> redCards(n);
  for(int i = 0; i < n; i++) {
    cin >> redCards.at(i);
  }

  int ans = 0;
  string current;
  for(int i = 0; i < m; i++) {
 	current = blueCards.at(i); 
    tmpAns = 0;
    for(int j = 0; i < m; j++) {
      if(blueCards.at(j) == current) tmpAns++;
      if(j < redCards.size() && redCards.at(j) == current ) tmpAns--;
    }
    if(tmpAns > ans) ans = tmpAns;
  }
	cout << ans << endl;  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'tmpAns' was not declared in this scope
   22 |     tmpAns = 0;
      |     ^~~~~~
Language: C++

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

int main() {
  int m;
  cin >> m;
  vector<string> blueCards(m);
  for(int i = 0; i < m; i++) {
    cin >> blueCards.at(i);
  }
  int n;
  cin >> n;
  vector<string> redCards(n);
  for(int i = 0; i < n; i++) {
    cin >> redCards.at(i);
  }

  int ans = 0;
  string current;
  for(int i = 0; i < m; i++) {
 	current = blueCards.at(i)   
    tmpAns = 0;
    for(int j = 0; i < m; j++) {
      if(blueCards.at(j) == current) tmpAns++;
      if(j < redCards.size() && redCards.at(j) == current ) tmpAns--;
    }
    if(tmpAns > ans) ans = tmpAns;
  }
	cout << ans << endl;  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:34: error: expected ';' before 'tmpAns'
   21 |         current = blueCards.at(i)
      |                                  ^
      |                                  ;
   22 |     tmpAns = 0;
      |     ~~~~~~                        
a.cc:24:38: error: 'tmpAns' was not declared in this scope
   24 |       if(blueCards.at(j) == current) tmpAns++;
      |                                      ^~~~~~
a.cc:25:61: error: 'tmpAns' was not declared in this scope
   25 |       if(j < redCards.size() && redCards.at(j) == current ) tmpAns--;
      |                                                             ^~~~~~
a.cc:27:8: error: 'tmpAns' was not declared in this scope
   27 |     if(tmpAns > ans) ans = tmpAns;
      |        ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    vector<string> b(n);
    string s;
    for(int i=0;i<n;i++){
        cin >> s;
        r.push_back(s);
    }
    int m;
    cin >> m;
    vector<string> r(m);
    for(int i=0;i<m;i++){
        cin >> s;
        b.push_back(s);
    }
    int ans=0;
    for(int i=0;i<n;i++){
        int sum=0;
        string tmp=r.at(i);
        for(int j=0;j<n;j++){
            if(tmp==b.at(j)){
                ++sum;
            }
        }
        for(int j=0;j<m;j++){
            if(tmp==r.at(j)) {
                --sum;
            }
        }
        ans=max(ans, sum);
    }
    
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'r' was not declared in this scope
   10 |         r.push_back(s);
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MIN(a,b) ((a)<(b) ? (a) : (b))

int main() {
  int N,M;
  int max;
  vector<string> blue,red;
  
  cin >> N;
  blue = vector<string>(N);
  for (int i=0;i<N;i++) {
    cin >> blue.at(i);
  }
  cin >> M;
  red = vector<string>(M);
  for (int i=0;i<M;i++) {
    cin >> red.at(i);
  }
  
  max = -M;
  for (int i=0; i<N; i++) {
    string target = blue.erase(i);
    int count = 1;
    for (int j=i+1; j<N;j++) {
      if ( target==blue.at(j) ) {
        count++;
      }
    }
    for (int j=0; j<M;j++) {
      if ( target==red.at(j) ) {
        count--;
      }
    }
    max = MIN(max,count);
  }
  
  cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:31: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::erase(int&)'
   23 |     string target = blue.erase(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:1536:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1536 |       erase(const_iterator __position)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1536:28: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::const_iterator'
 1536 |       erase(const_iterator __position)
      |             ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; iterator = std::vector<std::__cxx11::basic_string<char> >::iterator; const_iterator = std::vector<std::__cxx11::basic_string<char> >::const_iterator]'
 1564 |       erase(const_iterator __first, const_iterator __last)
      |       ^~~~~
/usr/include/c++/14/bits/stl_vector.h:1564:7: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MIN(a,b) ((a)<(b) ? (a) : (b))

int main() {
  int N,M;
  int max;
  vector<string> blue,red;
  
  cin >> N;
  blue = vector<string>(N);
  for (int i=0;i<N;i++) {
    cin >> blue.at(i);
  }
  cin >> M;
  red = vector<string>(M);
  for (int i=0;i<M;i++) {
    cin >> red.at(i);
  }
  
  max = -M;
  while ( blue.size() ) {
    string target = blue.pop(0);
    int count = 1;
    for (int i=0; i<blue.size();) {
      if ( target==blue.at(i) ) {
        count++;
        blue.pop(i);
      } else {
        i++;
      }
    }
    for (int i=0; i<red.size();) {
      if ( target==red.at(i) ) {
        count--;
        red.pop(i);
      } else {
        i++;
      }
    }
    max = MIN(max,count);
  }
  
  cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:26: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pop'
   23 |     string target = blue.pop(0);
      |                          ^~~
a.cc:28:14: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pop'
   28 |         blue.pop(i);
      |              ^~~
a.cc:36:13: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pop'
   36 |         red.pop(i);
      |             ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MIN(a,b) ((a)<(b) ? (a) : (b))

int main() {
  int N,M;
  int max;
  vector<string> blue,red;
  
  cin >> N;
  blue = vector<string>(N);
  for (int i=0;i<N;i++) {
    cin >> blue.at[i];
  }
  cin >> M;
  red = vector<string>(M);
  for (int i=0;i<M;i++) {
    cin >> red.at[i];
  }
  
  max = -M;
  while ( blue.size() ) {
    string target = blue.pop(0);
    int count = 1;
    for (int i=0; i<blue.size();) {
      if ( target==blue.at(i) ) {
        count++;
        blue.pop(i);
      } else {
        i++;
      }
    }
    for (int i=0; i<red.size();) {
      if ( target==red.at(i) ) {
        count--;
        red.pop(i);
      } else {
        i++;
      }
    }
    max = MIN(max,count);
  }
  
  cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   13 |     cin >> blue.at[i];
      |                   ^
a.cc:18:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   18 |     cin >> red.at[i];
      |                  ^
a.cc:23:26: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pop'
   23 |     string target = blue.pop(0);
      |                          ^~~
a.cc:28:14: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pop'
   28 |         blue.pop(i);
      |              ^~~
a.cc:36:13: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pop'
   36 |         red.pop(i);
      |             ^~~
Language: C++

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

int main() 
{
	int N,M,Ni,Mi;
  cin >> N;
  Ni = N * N / 2 + 0.5
cout << Ni;

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before 'cout'
    8 |   Ni = N * N / 2 + 0.5
      |                       ^
      |                       ;
    9 | cout << Ni;
      | ~~~~                   
a.cc:9:12: error: expected '}' at end of input
    9 | cout << Ni;
      |            ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

int main() {
  int N, M;
  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);
  }
  
  int cnt = 0;
  int ans = 0;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (s.at(i) == s.at(j)) {
        cnt++;
      }
    }
    for (int j = 0; j < M; j++) {
      if (s.at(i) == t.at(j)) {
        cnt--;
      }
    }
    if (ans < cnt) {
      ans = cnt;
    }
  }
  cout > ans >> endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:14: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>>'
   34 |   cout > ans >> endl;
      |          ~~~~^~~~~~~
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M ;
  
  vector<string> s(N);
  vector<string> t(M);
  vector<int> score_all(N,0);
  
  int final_score=0;
    
  for(int i = 0; i < N ; i++){
    cin >> s.at(i);}
  for(int j = 0; j < N ; j++){
    cin >> t.at(j);}
  
  for(int i = 0; i < N ; i++){
    int score_a=0;
    string S;
    S = s.at(i);
    for(int j = 0; j <N ; j++){
      if( S == s.at(j) ){
        score_a++;}}
    for(int k = 0; k <M ; k++){
      if(S ==t.at(k)){
        score_a--;}}
    score_all.at(i) = score_a + score_b;}
  
  for(int i =0; i < N ; i++){
    if(final_score < score_all.at(i)){
      final_score=score_all.at(i);}}
  cout << final_score <<endl;
     
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:33: error: 'score_b' was not declared in this scope; did you mean 'score_a'?
   29 |     score_all.at(i) = score_a + score_b;}
      |                                 ^~~~~~~
      |                                 score_a
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M ;
  
  vector<string> s(N);
  vector<string> t(M);
  vector<int> score_all(N,0);
  
  int score_a=0, score_b=0, final_score=0;
    
  for(int i = 0; i < N ; i++){
    cin >> s.at(i);}
  for(int j = 0; j < N ; j++){
    cin >> t.at(j);}
  
  for(int i = 0; i < N ; i++){
    string S = s.at(i);
    for(int j = 0; j <N ; j++){
      if( S == s.at(j) ){
        score_a++}}
    for(int k = 0; k <M ; k+;){
      if(S ==t.at(k)){
        score_b--}}
    score_all.at(i) = score_a + score_b}
  
  for(int i =0; i < N ; i++){
    if(final_score < score_all.at(i)){
      final_score<-score_all.at(i)}}
  cout << final_score <<endl;
     
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: expected ';' before '}' token
   23 |         score_a++}}
      |                  ^
      |                  ;
a.cc:24:29: error: expected primary-expression before ';' token
   24 |     for(int k = 0; k <M ; k+;){
      |                             ^
a.cc:24:29: error: expected ')' before ';' token
   24 |     for(int k = 0; k <M ; k+;){
      |        ~                    ^
      |                             )
a.cc:24:30: error: expected primary-expression before ')' token
   24 |     for(int k = 0; k <M ; k+;){
      |                              ^
a.cc:27:40: error: expected ';' before '}' token
   27 |     score_all.at(i) = score_a + score_b}
      |                                        ^
      |                                        ;
a.cc:31:35: error: expected ';' before '}' token
   31 |       final_score<-score_all.at(i)}}
      |                                   ^
      |                                   ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int a,b;
int main(){
  cin>>a;
  vector<string> c(a),e(a,0);
  for(int i=0;i<a;i++)cin>>c[i];
  cin>>b;
  vector<string> d(b);
  for(int i=0;i<b;i++)cin>>c[i];
  for(int i=0;i<a;i++){
    for(int j=0;j<a+b-1;j++){
      if(j<a){
        if(c[i]==c[j+1])e[i]++;
      }
      else if(c[i]==d[j-a])e[i]--;
    }
  }
  sort(e.begin(), e.end())
  reverse(e.begin(), e.end());
  cout<<e[0];
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   14 |         if(c[i]==c[j+1])e[i]++;
a.cc:16:32: error: no 'operator--(int)' declared for postfix '--' [-fpermissive]
   16 |       else if(c[i]==d[j-a])e[i]--;
a.cc:19:27: error: expected ';' before 'reverse'
   19 |   sort(e.begin(), e.end())
      |                           ^
      |                           ;
   20 |   reverse(e.begin(), e.end());
      |   ~~~~~~~
Language: C++

#include<iostream>
#include<map>
#include<string>

int main () {
  std::map<std::string,int> blue;
  std::map<std::string,int> data;
  std::map<std::string,int> red;
  int b_num, r_num;
  std::cin >> b_num >> r_num;
  for (int i=0; i<b_num; i++) {
    std::string str;
    std::cin >> str;
    data[str] = 1;
    if (!blue.count(str)) {
      blue[str] = 1;
    }
    else {
      blue.at(str)++;
    }
  }
  for (int i=0; i<r_num; i++) {
    std::string str;
    std::cin >> str;
    data[str] = 1;
    if (!red.count(str)) {
      blue[str] = 1;
    }
    else {
      red.at(str)++;
    }
  }
  int flag = 0;
  int sum = 0;
  for (auto p: data) {
    temp_sum=0;
    auto key = p.first;
    if (blue.count(key)) {
      temp_sum += blue.at(key);
    }
    if (red.count(key)) {
      temp_sum -= red.at(key);
    }
    if (!flag) {
      sum = temp_sum;
      flag = 1;
    }
    else
    {
      sum = std::max(sum ,temp_sum);
    }
  }
  std::cout << sum << std::endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:36:5: error: 'temp_sum' was not declared in this scope
   36 |     temp_sum=0;
      |     ^~~~~~~~
Language: C++

#include<iostream>
#include<map>
#include<string>

int main () {
  std::map<std::string,int> blue;
  std::map<std::string,int> data;
  std::map<std::string,int> red;
  int b_num, r_num;
  std::cin >> b_num >> r_num;
  for (int i=0; i<b_num; i++) {
    std::string str;
    std::cin >> str;
    data[str] = 1;
    if (!blue.count(str)) {
      blue[str] = 1;
    }
    else {
      blue.at(str)++;
    }
  }
  for (int i=0; i<r_num; i++) {
    std::string str;
    std::cin >> str;
    data[str] = 1;
    if (!red.count(str)) {
      blue[str] = 1;
    }
    else {
      red.at(str)++;
    }
  }
  int sum = 0;
  for (auto p: data) {
    auto key = p.first;
    if (blue.count(key)) {
      sum += blue.at(key);
    }
    if (red.count(key)) {
      sum -= red.at(key);
    }
  }
  std::cout << sum << sd::endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:43:23: error: 'sd' has not been declared
   43 |   std::cout << sum << sd::endl;
      |                       ^~
Language: C++

#include<iostream>
#include<map>
#include<string>

int main () {
  std::map<std::string,int> blue;
  std::map<std::string,int> data;
  std::map<std::string,int> red;
  int b_num, r_num;
  std::cin >> b_num >> r_num;
  for (int i=0; i<b_num; i++) {
    std::string str;
    std::cin >> str;
    data[str] = 1;
    if (!blue.count(str)) {
      blue[str] = 1;
    }
    else {
      blue.at(str)++;
    }
  }
  for (int i=0; i<r_num; i++) {
    std::string str;
    std::cin >> str;
    data[str] = 1;
    if (!red.count(str)) {
      blue[str] = 1;
    }
    else {
      red.at(str)++;
    }
  }
  int sum = 0;
  for (auto p: data) {
    auto key = data.first;
    if (blue.count(key)) {
      sum += blue.at(key);
    }
    if (red.count(key)) {
      sum -= red.at(key);
    }
  }
  std::cout << sum << sd::endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:35:21: error: 'class std::map<std::__cxx11::basic_string<char>, int>' has no member named 'first'
   35 |     auto key = data.first;
      |                     ^~~~~
a.cc:43:23: error: 'sd' has not been declared
   43 |   std::cout << sum << sd::endl;
      |                       ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M;
  cin>>N;
  vector<string> vn(N);
  for(int i=0;i<N;i++){
    cin>>vn.at(i);
  }
  cin>>M;
  vector<string> vm(M);
  for(int i=0;i<M;i++){
    cin>>vm.at(i);
  }
  int max=0;
  for(int i=0;i<N;i++){
    int c1=0,c2=0,s=0;
    string x=vn.at(i);
    for(int j=0;j<N;j++){
      if(x==v1.at(j)){
        c1++;
      }
    }
    for(int j=0;j<M;j++){
      if(x==v2.at(j)){
        c2++;
      }
    }
    s=c1-c2;
    if(max<=s){
      max=s;
    }
  }
  cout<<max<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'?
   21 |       if(x==v1.at(j)){
      |             ^~
      |             __pstl::execution::v1
In file included from /usr/include/c++/14/pstl/glue_algorithm_defs.h:15,
                 from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/execution_defs.h:19:18: note: '__pstl::execution::v1' declared here
   19 | inline namespace v1
      |                  ^~
a.cc:26:13: error: 'v2' was not declared in this scope; did you mean 'c2'?
   26 |       if(x==v2.at(j)){
      |             ^~
      |             c2
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){

  int N,M,best=0,count;
  
  cin >> N;
  vector<string> Nvec(N);
  cin >> M;
  vector<string> Mvec(M);
  
  for(int i=0;i<Nvec.size();i++){
    count = Count(Nvec,Nvec.at(i),1)+Count(Mvec,Nvec.at(i),-1);
    if(count > best) best=count;
  }
  
  cout << best << endl;
}

int Count(vector<string> A,string str,int n){
  int count=0;
  for(int i=0;i<A.size();i++)
    if(A.at(i)==str) count++;
  return n*count;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'Count' was not declared in this scope; did you mean 'count'?
   15 |     count = Count(Nvec,Nvec.at(i),1)+Count(Mvec,Nvec.at(i),-1);
      |             ^~~~~
      |             count
Language: C

#include <iostream>
#include <cstdlib>
#include <string>
#include <map>

using namespace std;

int main()
{
    map<string,int> word_count;// empty

    string word;
	int n,m;
	cin>>n;
    for(int i=0;i<n;i++)
    {
    	cin >> word;
        ++word_count[word];                      // 用下标访问
    }
    cin>>m;
	for(int i=0;i<m;i++)
    {
    	cin >> word;
        --word_count[word];                      // 用下标访问
    }
    map<string, int>::iterator iter;             // iter 为pair 类型(value_type)
    int max=-1;
    for(iter = word_count.begin(); iter != word_count.end(); iter++)
    {
        if(iter->second>max){
        	max=iter->second;
		}
    }
	if(max<=0){
			cout<<0<<endl;
		}
	else{
		cout<<max<<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 rep0(i,n) for (int i = 0; i < (n); ++i)
#define rep1(i,n) for (int i = 1; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define mREP(i,a,b) for (int i = a; i > (b); --i)
#define all(x) (x).begin(),(x).end()
const int INF = 1000000007;
typedef long long ll;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }

int main(){
  int n,m;
  cin >> n;
  string temp;
  map<string,int>a;
  rep0(i,n){
    cin >> temp;
    a[temp]++;
  }
  cin >> m;
  rep0(i,m){
    cin >> temp;
    a[temp]--;
  }
  int ans = -1000;
  for (auto j : a){
    ans = max(ans,i.second);
  }
  cout << max(0,ans) << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:19: error: 'i' was not declared in this scope
   30 |     ans = max(ans,i.second);
      |                   ^
Language: C++

#include<stdio.h>
#include<vector>
#include<iostream> //c++
#include<algorithm>
/*
int main(){
	int a=0;
	char A[5];
	for (int i = 0; i < 5; i++) {
		scanf("%c\n", &A[i]);
	}
	
	for(int i = 0; i < 5; i++) {
		if (A[i] =='A' &&A[i + 1]=='C') {
			a = 1;
		
		}
	}
	if (a == 1) {
		printf("Yes");

	}
	else {
		printf("No");
	}
}*/

using namespace std;
/*int main() {
	int g;
	int  N,Num=0;
	vector<int>a;
	cin >> N;
	for (int i = 0; i < N;i++) {

		cin >> g;

		a.push_back(g);
	

	}
	int t,p=0;
	while (true) {
		t=a[p] ;
		a[p] = -1;
		p = t;
		if (p == -1) {
			Num = -1;
			break;
		}
			Num++;
			if (p == 2) {
				break;
			}
			p = p - 1;
	}
	cout << Num;
	



int main() {
	
		long long N, g;
	vector<int>a;
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> g;
		a.push_back(g);
	}
	sort(a.begin(), a.end());
	long long Num1 = 0, Num2 = 0, Num;
	for (int i = 0; i < N; i++)
	{
		if (a[i] == a[i + 1] && a[i] >= Num1 && i != N - 1) {
			Num2 = Num1;
			Num1 = a[i];
			i++;
		}
	}
	Num = Num1 * Num2;
	cout << Num;
	return 0;
}
	

int main(){vector<int>S;
	int count=0;
	int g;

		cin >> g;
		S.push_back((g %100000)/10000);
		S.push_back((g %10000)/1000);
		S.push_back((g %1000)/100);
		S.push_back((g %100)/10);
		S.push_back((g %10)/1);
		S.push_back((g %1000000)/100000);
		
		
		for (int i = 0; i < 6; i++) {
			if (S[i] == 1) {

				count++;
			}
		}



	cout << count;






*/

int main(){
int num;
char s[100];
char t[100];

	int N, M;
	cin >> N;
	
	
	for (int i = 0; i < N; i++) {
		cin >> s[i];
	}
	cin >> M;
	for (int i = 0; i < M; i++) {
		cin t[i];
	}
	int count=0;
	int max=0;
	for (int k = 0; k < N; k++) {
		for (int i = 0; i < M; i++) {

			if (s[k] == s[i]) {

				num++;
			}
		}
		for (int i = 0; i < M; i++) {
			
				if (s[k] == t[i]) {
				
				num--;
			}
		}
		count = 0;
		if (max < num){
		
		}
		num = 0;
	}
	count >> max;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:132:20: error: expected ';' before 't'
  132 |                 cin t[i];
      |                    ^~
      |                    ;
Language: C++

#include<stdio.h>
#include<vector>
#include<iostream> //c++
#include<algorithm>
/*
int main(){
	int a=0;
	char A[5];
	for (int i = 0; i < 5; i++) {
		scanf("%c\n", &A[i]);
	}
	
	for(int i = 0; i < 5; i++) {
		if (A[i] =='A' &&A[i + 1]=='C') {
			a = 1;
		
		}
	}
	if (a == 1) {
		printf("Yes");

	}
	else {
		printf("No");
	}
}*/

using namespace std;
/*int main() {
	int g;
	int  N,Num=0;
	vector<int>a;
	cin >> N;
	for (int i = 0; i < N;i++) {

		cin >> g;

		a.push_back(g);
	

	}
	int t,p=0;
	while (true) {
		t=a[p] ;
		a[p] = -1;
		p = t;
		if (p == -1) {
			Num = -1;
			break;
		}
			Num++;
			if (p == 2) {
				break;
			}
			p = p - 1;
	}
	cout << Num;
	



int main() {
	
		long long N, g;
	vector<int>a;
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> g;
		a.push_back(g);
	}
	sort(a.begin(), a.end());
	long long Num1 = 0, Num2 = 0, Num;
	for (int i = 0; i < N; i++)
	{
		if (a[i] == a[i + 1] && a[i] >= Num1 && i != N - 1) {
			Num2 = Num1;
			Num1 = a[i];
			i++;
		}
	}
	Num = Num1 * Num2;
	cout << Num;
	return 0;
}
	

int main(){vector<int>S;
	int count=0;
	int g;

		cin >> g;
		S.push_back((g %100000)/10000);
		S.push_back((g %10000)/1000);
		S.push_back((g %1000)/100);
		S.push_back((g %100)/10);
		S.push_back((g %10)/1);
		S.push_back((g %1000000)/100000);
		
		
		for (int i = 0; i < 6; i++) {
			if (S[i] == 1) {

				count++;
			}
		}



	cout << count;






*/

int main(){
int num;
char s[100];
char t[100];

	int N, M;
	cin >> N;
	
	
	for (int i = 0; i < N; i++) {
		cin >> s[i];
	}
	cin >> M;
	for (int i = 0; i < M; i++) {
		cin t[i];
	}
	int count=0;
	int max=0;
	for (int k = 0; k < N; k++) {
		for (int i = 0; i < M; i++) {

			if (s[k] == s[i]) {

				num++;
			}
		}
		for (int i = 0; i < 100; i++) {
			
				if (s[k] == t[i]) {
				
				num--;
			}
		}
		count = 0;
		if (max < num){
		
		}
		num = 0;
	}
	count >> max;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:132:20: error: expected ';' before 't'
  132 |                 cin t[i];
      |                    ^~
      |                    ;
Language: C++


char s[100][11];
char t[100][11];
int main(){
int num;
	int N, M;
	cin >> N;
	
	
	for (int i = 0; i < N; i++) {
		scanf("%s", t[i]);
	}
	cin >> M;
	for (int i = 0; i < M; i++) {
		scanf("%s", t[i]);
	}
	int count=0;
	int max=0;
	for (int k = 0; k < 100; k++) {
		for (int i = 0; i < 100; i++) {
			for (int j = 0; j < 11; j++) {
				if (s[k][j] == s[i][j]) {
					count++;

				}
			}
			if (count == 10) {
				num++;
			}
		}
		for (int i = 0; i < 100; i++) {
			for (int j = 0; j < 11; j++) {
				if (s[k][j] == t[i][j]) {
					count++;

				}
			}
			if (count == 10) {
				num--;
			}
		}
		count = 0;
		if (max < num){
		
		}
		num = 0;
	}
	count >> max;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> N;
      |         ^~~
a.cc:11:17: error: 'scanf' was not declared in this scope
   11 |                 scanf("%s", t[i]);
      |                 ^~~~~
a.cc:15:17: error: 'scanf' was not declared in this scope
   15 |                 scanf("%s", t[i]);
      |                 ^~~~~
Language: C++

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

int main(){
  int a;
  string b[120];
    cin>>a;
  for(int i=0;i<a;i++){
  cin >>b[i];
  }
  int c ;
  cin >>c;
  string d[120];
  for(int i =0;i<c ;i++){
    cin >>d[i];
  }
  
  int e =0;
  for(int i =0;i<a;i++){
     int f = 0;
    for(int j=0;j<a;j++){
     
      if(b[i] == b[j]){
         f++;
      }
    }
    for(int j =0;j<c;j++){
       if(b[i] == d[j]){ 
         f--;
       }
    }
    }
     e = max(f,e);
  }
  cout << e << endl;
  }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: 'f' was not declared in this scope
   33 |      e = max(f,e);
      |              ^
a.cc: At global scope:
a.cc:35:3: error: 'cout' does not name a type
   35 |   cout << e << endl;
      |   ^~~~
a.cc:36:3: error: expected declaration before '}' token
   36 |   }
      |   ^
Language: C++

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

int main(){
  int a;
  string b[120];
    cin>>a;
  for(int i=0;i<a;i++){
  cin >>b[i];
  }
  int c ;
  cin >>c;
  string d[120];
  for(int i =0;i<c ;i++){
    cin >>d[i];
  }
  
  int e =0;
  for(int i =0;i<a;i++){
     int f = 0;
    for(int j=0;j<a);j++){
     
      if(b[i] == b[j]){
         f++;
      }
    }
    for(int j =0;j<c;j++){
       if(b[i] == d[j]){ 
         f--;
       }
    }
    }
     e = max(f,e);
  }
  cout << e << endl;
  }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: expected ';' before ')' token
   21 |     for(int j=0;j<a);j++){
      |                    ^
      |                    ;
a.cc:21:22: error: 'j' was not declared in this scope
   21 |     for(int j=0;j<a);j++){
      |                      ^
a.cc:33:14: error: 'f' was not declared in this scope
   33 |      e = max(f,e);
      |              ^
a.cc: At global scope:
a.cc:35:3: error: 'cout' does not name a type
   35 |   cout << e << endl;
      |   ^~~~
a.cc:36:3: error: expected declaration before '}' token
   36 |   }
      |   ^
Language: Java

import java.util.Scanner;

public class Main {
	static Scanner s = new Scanner(System.in);

	public static void main(String[] args) {

		int N = s.nextInt();
		String[] bArr = new String[N];
		boolean[] bBoolArr = new boolean[N];

		for (int i = 0; i < N; i++) {
			bArr[i] = s.next();
			bBoolArr[i] = true;
		}

		int M = s.nextInt();
		String[] rArr = new String[M];

		for (int i = 0; i < M; i++) {
			rArr[i] = s.next();
		}

		int count;
		int ans = 0;

		if (N == 1) {
			for (int k = 0; k < M; k++) {
				if (rArr[k].equals(bArr[0])) {
					System.out.println(0);
					return;
				}
			}
			System.out.println(1);
			return;
		}

		for (int i = 0; i < N; i++) {
			if (bBoolArr[i] == true) {
				count = 1;
				for (int j = i + 1; j < N; j++) {

					if (bArr[i].equals(bArr[j])) {
						bBoolArr[j] = false;
						count++;
					}
				}

				for (int k = 0; k < M; k++) {
					if (bArr[i].equals(rArr[k])) {
						count--;
					}
				}
			}if (count < 1) {
				count = 0;
			}
			if (ans < count) {
				ans = count;
			}



			bBoolArr[i] = false;
		}
		System.out.println(ans);

	}
}

Compiler output:
Main.java:54: error: variable count might not have been initialized
			}if (count < 1) {
			     ^
1 error