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

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

int main() {
  int B,R,i,j;
  vec<int> count;
  cin>>B;
  vec<string> vecB(B);
  for(i=0;i<B;i++)cin>>vecB.at(i);
  cin>>R;
  vec<string> vecR(R);
  for(i=0;i<R;i++)cin>>vecR.at(i);
  for(i=1;i<B;i++){
    for(j=0;j<i;j++){
      if(vecB.at(i)==vecB.at(j)){
        count.at(i)++;
        vecB.at(j)="";
      }
    }
  }
  int n=count.at(1);
  for(i=0;i<B;i++){
    for(j=0;j<A;j++){
      if(vecA.at(j)==vecB.at(i)){
        count.at(i)--;
      }
    }
  }
   for(i=1;i<B;i++){
    for(j=0;j<i;j++){
      if(count.at(j)>count.at(i))n=count.at(j);
      else n=count.at(i);
    }
   }
  cout<<n<<endl;
        
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vec' was not declared in this scope
    6 |   vec<int> count;
      |   ^~~
a.cc:6:7: error: expected primary-expression before 'int'
    6 |   vec<int> count;
      |       ^~~
a.cc:8:13: error: expected primary-expression before '>' token
    8 |   vec<string> vecB(B);
      |             ^
a.cc:8:15: error: 'vecB' was not declared in this scope
    8 |   vec<string> vecB(B);
      |               ^~~~
a.cc:11:13: error: expected primary-expression before '>' token
   11 |   vec<string> vecR(R);
      |             ^
a.cc:11:15: error: 'vecR' was not declared in this scope
   11 |   vec<string> vecR(R);
      |               ^~~~
a.cc:16:15: error: overloaded function with no contextual type information
   16 |         count.at(i)++;
      |               ^~
a.cc:21:15: error: overloaded function with no contextual type information
   21 |   int n=count.at(1);
      |               ^~
a.cc:23:15: error: 'A' was not declared in this scope
   23 |     for(j=0;j<A;j++){
      |               ^
a.cc:24:10: error: 'vecA' was not declared in this scope
   24 |       if(vecA.at(j)==vecB.at(i)){
      |          ^~~~
a.cc:25:15: error: overloaded function with no contextual type information
   25 |         count.at(i)--;
      |               ^~
a.cc:31:16: error: overloaded function with no contextual type information
   31 |       if(count.at(j)>count.at(i))n=count.at(j);
      |                ^~
a.cc:31:28: error: overloaded function with no contextual type information
   31 |       if(count.at(j)>count.at(i))n=count.at(j);
      |                            ^~
a.cc:31:42: error: overloaded function with no contextual type information
   31 |       if(count.at(j)>count.at(i))n=count.at(j);
      |                                          ^~
a.cc:32:20: error: overloaded function with no contextual type information
   32 |       else n=count.at(i);
      |                    ^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define fi first
#define se second
#define bigger (char)toupper
#define smaller (char)tolower
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<char> vc;
typedef long long ll;
typedef unsigned long long long ull;

int main() {
  int N;
  cin>>N;
  vs s(N);
  rep(i,N) cin>>s[i];
  int M;
  cin>>M;
  vs t(M); 
  rep(i,M) cin>>t[i];
  auto point=[&](string x) {
    int counter=0;
    for(auto a : s) {
      if(a==x) counter++;
    }
    for(auto a : t) {
      if(a==x) counter--;
    }
    return counter;
  };
  int answer=0;
  for(auto a : s) {
    answer=max(answer,point(a));
  }
  cout<<answer<<endl;
}

Compiler output:
a.cc:16:28: error: 'long long long' is too long for GCC
   16 | typedef unsigned long long long ull;
      |                            ^~~~
Language: C++

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

int main(){
    int n,m;
    cin >> n;
    vector<string> blue(n);
    for (int i = 0; i < n; i++){
        cin >> blue[i];
    }
    cin >> m;
    vector<string> red(m);
    for (int i = 0; i < m; i++){
        cin >> red[i];
    }

    int ans = 0;
    auto calc = [6](string s){
        int buff = 0;
        for (string t: blue){
            if (t == s){
                buff++;
            }
        }
        for (string t: red){
            if (t == s){
                buff--;
            }
        }

        return buff;
    };

    for (int i = 0; i < n; i++){
        ans = max(ans,calc(blue[i]));
    }

    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected identifier before numeric constant
   18 |     auto calc = [6](string s){
      |                  ^
a.cc: In lambda function:
a.cc:20:24: error: 'blue' is not captured
   20 |         for (string t: blue){
      |                        ^~~~
a.cc:18:19: note: the lambda has no capture-default
   18 |     auto calc = [6](string s){
      |                   ^
a.cc:7:20: note: 'std::vector<std::__cxx11::basic_string<char> > blue' declared here
    7 |     vector<string> blue(n);
      |                    ^~~~
a.cc:25:24: error: 'red' is not captured
   25 |         for (string t: red){
      |                        ^~~
a.cc:18:19: note: the lambda has no capture-default
   18 |     auto calc = [6](string s){
      |                   ^
a.cc:12:20: note: 'std::vector<std::__cxx11::basic_string<char> > red' declared here
   12 |     vector<string> red(m);
      |                    ^~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n, m, max = 0;
  cin >> n;
  string blue[n];
  for(int i = 0; i < n, i++){
  	cin >> blue[i];
  }
  cin >> m;
  string red[m];
  for(int i = 0; i < m, i++){
  	cin >> red[i];
  }

  for(int i = 0; i < n, i++){
    int c = 0;
    for(int j = 0; j < n, j++){
      if(blue[j] == blue[i]) c++;
    }
    for(int j = 0; j < m, j++){
      if(red[j] == blue[i]) c--;
    }
    if(c > max) max = c;
  }
  
  cout << max;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before ')' token
    9 |   for(int i = 0; i < n, i++){
      |                            ^
      |                            ;
a.cc:14:28: error: expected ';' before ')' token
   14 |   for(int i = 0; i < m, i++){
      |                            ^
      |                            ;
a.cc:18:28: error: expected ';' before ')' token
   18 |   for(int i = 0; i < n, i++){
      |                            ^
      |                            ;
a.cc:20:30: error: expected ';' before ')' token
   20 |     for(int j = 0; j < n, j++){
      |                              ^
      |                              ;
a.cc:23:30: error: expected ';' before ')' token
   23 |     for(int j = 0; j < m, j++){
      |                              ^
      |                              ;
Language: C++

#include <bits/stdc++.h>
#include <stdio.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
ll mm=1000000000;ll MM=mm+7;
#define rep(i, n) for(int i=0;i<n;i++)

int main(){
  int n,m;
  cin >> n;
  vector<string> s(n);
  rep(i,n){
    cin >> s.at(i);
  }
  cin >> m;
  vector<string> t(m);
  rep(i,m){
    cin >> t.at(i);
  }
  map<string, int> time;
  for(string x: s){
    if(time.count(x)){
      time.at(x)++;
    }
    else{
      time[x]=1;
    }
  }
  for(string x:t){
    if(time.count(x)){
      time.at(x)--;
    }
    else{
      time[x]=-1;
    }
  }
  int mx=0;
  for(string x:s){
    mx= max(mx,time.at(x));
  }

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

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

int main(){

    int n,m;
    int ans=0;

    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);

    vector<int> cnt(n);

    for(int i=0;i<n;i++){
        
        for(int j=0;j<n;j++){

            if(s.at(i)==s.at(j)) cnt.at(i)++;

        }

    }

    for(int i=0;i<n;i++){

        for(int j=0;j<m;j++){

            if(s.at(i)==t.at(j)) cnt.at(i)--;

        }

    }

    for(int i=0;i<n;i++){

        ans=max(ans,cnt.at(i));

    }

    cout<<ans<<endl;










    return 0;
}
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

int main(){

    int n,m;
    int ans=0;

    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);

    vector<int> cnt(n);

    for(int i=0;i<n;i++){
        
        for(int j=0;j<n;j++){

            if(s.at(i)==s.at(j)) cnt.at(i)++;

        }

    }

    for(int i=0;i<n;i++){

        for(int j=0;j<m;j++){

            if(s.at(i)==t.at(j)) cnt.at(i)--;

        }

    }

    for(int i=0;i<n;i++){

        ans=max(ans,cnt.at(i));

    }

    cout<<ans<<endl;










    return 0;
}


Compiler output:
a.cc:65:5: error: redefinition of 'int main()'
   65 | int main(){
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main(){
      |     ^~~~
Language: C++

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

int main() {
	int N , M;
    string S;
  	int SUM;
  	int MAX = 0;
    cin >> N;
  	vector<string> blue(N);
  	//青いカードの文字列 N 個を全て読み込む
  	for(int i = 0; i < N; i++){
      	cin >> 	S;
    	blue.at(i) = S;
    }
    cin >> M;
  	vector<string> red(M);
	//赤いカードの文字列 M 個を全て読み込む
  	for(int j = 0; j < M; j++){
    	cin >> S;
      	red.at(j) = S;
    }

  	string temp;
  	for(int i = 0; i< N; i++){
      	SUM = 0;
       	//青いカードのi番目の文字列をいったん temp に入れる
    	temp = blue.at(i);
      	//tempと同じ文字列が青いカードの中に何個あるか数えて、見つかるごとにSUMを1増やす
      	for(int i = 0; i < N; i++){
        	if(blue.at(i) == temp){
            	SUM += 1;
            }
        }
      　//tempと同じ文字列が赤いカードの中に何個あるか数えて、見つかるごとにSUMを1減らす
      	for(int j = 0; j < M; j++){
        	if(red.at(j) == temp){
            	SUM -= 1;
            }
        }
      	//SUMの数字とMAXを比較し、SUMの方が大きかったらMAXの値を更新する
      	if(SUM > MAX){
        	MAX = SUM;
        }
    }
	cout << MAX << endl;
}


Compiler output:
a.cc:35:7: error: extended character 　 is not valid in an identifier
   35 |       　//tempと同じ文字列が赤いカードの中に何個あるか数えて、見つかるごとにSUMを1減らす
      |       ^
a.cc: In function 'int main()':
a.cc:35:7: error: '\U00003000' was not declared in this scope
   35 |       　//tempと同じ文字列が赤いカードの中に何個あるか数えて、見つかるごとにSUMを1減らす
      |       ^~
a.cc:36:24: error: 'j' was not declared in this scope
   36 |         for(int j = 0; j < M; j++){
      |                        ^
Language: C++

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

int main() {
  int N, M;
  
  //青カード配列
  cin >> N;
  vector<int> vecN(N);
  for(int i = 0; i < N; i++){
    cin >> vecN.at(i);
  }
  
  //赤カード配列
  cin >> M;
  vector<int> vecM(M);
  for(int i = 0; i < M; I++){
    cin >> vecM.at(i);
  }
  
  //各点数算出
  int max = 0;
  for(int i = 0; i < N; i++){
    int counter = 0;
    //加算
    for(int j = 0; j < N; j++){
      if(vecN.at(i) == vecN.at(j)){
        counter += 1;
      }
      else{
      }
    }
    //減算
    for(int j = 0; j < M; j++){
      if(vecN.at(i) == vecM.at(j)){
        counter -= 1;
      }
      else{
      }
    }
    //最大値なら更新
    if(counter > max){
      max = cournter;
    }
    else{
    }
  }
  
  //表示
  cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'I' was not declared in this scope
   17 |   for(int i = 0; i < M; I++){
      |                         ^
a.cc:43:13: error: 'cournter' was not declared in this scope; did you mean 'counter'?
   43 |       max = cournter;
      |             ^~~~~~~~
      |             counter
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n;
  vector<string> vec1(n);
  for(int i=0;i<n;i++){
    cin>>vec1(i);
  }
  cin>>m;
  vector<string> vec2(m);
  for(int i=0;i<m;i++){
    cin>>vec2(i);
  }
  int c=0,max=0;
  for(int i=0;i<n;i++){
    for(int j=1;i+j<n;j++){
      if(vec1[i]==vec1[i+j]){
        c++;
      }
    }
    for(int j=0;j<m;j++){
      if(vec1[i]==vec2[j]){
        c--;
      }
    }
      if(c>max){
        max=c;
      }
    c=0;
  }
      cout<<max<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
    8 |     cin>>vec1(i);
      |          ~~~~^~~
a.cc:13:14: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   13 |     cin>>vec2(i);
      |          ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n;
  vector<string> vec1(n);
  for(int i=0,i<n,i++){
    cin>>vec1(i);
  }
  cin>>m;
  vector<string> vec2(m);
  for(int i=0,i<m,i++){
    cin>>vec2(i);
  }
  int c=0,max=0;
  for(int i=0,i<n,i++){
    for(int j=1,i+j<n,j++){
      if(vec1[i]==vec1[i+j]){
        c++;
      }
    }
    for(int j=0,j<m,j++){
      if(vec1[i]==vec2[j]){
        c--;
      }
    }
      if(c>max){
        max=c;
      }
    c=0;
  }
      cout<<max<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before '<' token
    7 |   for(int i=0,i<n,i++){
      |                ^
      |                ;
a.cc:7:16: error: expected primary-expression before '<' token
a.cc:7:22: error: expected ';' before ')' token
    7 |   for(int i=0,i<n,i++){
      |                      ^
      |                      ;
a.cc:8:14: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
    8 |     cin>>vec1(i);
      |          ~~~~^~~
a.cc:12:16: error: expected ';' before '<' token
   12 |   for(int i=0,i<m,i++){
      |                ^
      |                ;
a.cc:12:16: error: expected primary-expression before '<' token
a.cc:12:22: error: expected ';' before ')' token
   12 |   for(int i=0,i<m,i++){
      |                      ^
      |                      ;
a.cc:13:14: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   13 |     cin>>vec2(i);
      |          ~~~~^~~
a.cc:16:16: error: expected ';' before '<' token
   16 |   for(int i=0,i<n,i++){
      |                ^
      |                ;
a.cc:16:16: error: expected primary-expression before '<' token
a.cc:16:22: error: expected ';' before ')' token
   16 |   for(int i=0,i<n,i++){
      |                      ^
      |                      ;
a.cc:17:18: error: expected ';' before '+' token
   17 |     for(int j=1,i+j<n,j++){
      |                  ^
      |                  ;
a.cc:17:26: error: expected ';' before ')' token
   17 |     for(int j=1,i+j<n,j++){
      |                          ^
      |                          ;
a.cc:22:18: error: expected ';' before '<' token
   22 |     for(int j=0,j<m,j++){
      |                  ^
      |                  ;
a.cc:22:18: error: expected primary-expression before '<' token
a.cc:22:24: error: expected ';' before ')' token
   22 |     for(int j=0,j<m,j++){
      |                        ^
      |                        ;
Language: C++

/*
        Author: Prokash
                CSE48, JU

*/

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

typedef long long ll;
#define FAST ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
int main()
{
    FAST;
    map<string,int>blue,red;
    ll n,m,t;
    cin>>n;
    while(n--)
    {
        string str;
        cin>>str;
        blue[str]++;
    }
    cin>>m;
    while(m--)
    {
        string str;
        cin>>str;
        red[str]++;
        blue[str]--;
    }
    ll ans=INT_MIN;
    for(auto p:blue)
    {
        ans=max(ans,(p.second));
    }
    if(ans>=0)
    {
        cout<<ans<<endl;
    }
    else
    {
        cout<<0<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:16: error: no matching function for call to 'max(ll&, int&)'
   35 |         ans=max(ans,(p.second));
      |             ~~~^~~~~~~~~~~~~~~~
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:7:
/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:35:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   35 |         ans=max(ans,(p.second));
      |             ~~~^~~~~~~~~~~~~~~~
/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:35:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   35 |         ans=max(ans,(p.second));
      |             ~~~^~~~~~~~~~~~~~~~
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    String s[] = new String[N];
    for(int i=0;i<N;i++){
      s[i]=sc.next();
    }
    int M = sc.nextInt();
    String t[] = new String[M];
    for(int i=0;i<M;i++){
      t[i]=sc.next();
    }
    int point x[] = new int[N];
    for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        if(s[i].equals(s[j])){
          x[i]++;
        }
      }
      x[i]--;
      for(int j=0;j<M;j++){
        if(s[i].equals(t[j])){
          x[i]--;
        }
      }
    }
    Arrays.sort(x);
    System.out.println(Math.max(0,x[N-1]));

  }
  

  
}

Compiler output:
Main.java:15: error: ';' expected
    int point x[] = new int[N];
             ^
Main.java:15: error: not a statement
    int point x[] = new int[N];
               ^
Main.java:15: error: ';' expected
    int point x[] = new int[N];
                 ^
Main.java:15: error: not a statement
    int point x[] = new int[N];
                    ^
4 errors
Language: C

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

#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a < b ? a : b)
const int inf = 1000000000; // 10^9

int Amax(int *p,int size){
   int _max = 0;
   for(int i = 0;i < size;i++)
      if(p[i] > _max)_max = p[i];
   return _max;
}
int main(){
   int n,m;scanf("%d%d",&n,&m);
   char s1[101][11],s2[101][11];
   for(int i = 0;i < n;i++)scanf("%s",s1[i]);
   for(int i = 0;i < m;i++)scanf("%s",s2[i]);
   int ans[101];
   for(int i = 0;i < n;i++){
      for(int j = 0;j < n;j++)if(!(strcmp(s1[i],s1[j])))ans++;
      for(int j = 0;j < m;j++)if(!(strcmp(s1[i],s2[j])))ans--;
   }
   printf("%d",Amax(ans));
}

Compiler output:
main.c: In function 'main':
main.c:22:60: error: lvalue required as increment operand
   22 |       for(int j = 0;j < n;j++)if(!(strcmp(s1[i],s1[j])))ans++;
      |                                                            ^~
main.c:23:60: error: lvalue required as decrement operand
   23 |       for(int j = 0;j < m;j++)if(!(strcmp(s1[i],s2[j])))ans--;
      |                                                            ^~
main.c:25:16: error: too few arguments to function 'Amax'
   25 |    printf("%d",Amax(ans));
      |                ^~~~
main.c:9:5: note: declared here
    9 | int Amax(int *p,int size){
      |     ^~~~
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    Map<String,Integer> blue = new HashMap<String,Integer>();
    for(int i = 0; i < n; i++){
      String str = sc.next();
      if(blue.contains(str)){
        int count = blue.get(str)+1;
        blue.put(str,count);
      }
      else{
        blue.put(str,0);
      }
    }
    int m = sc.nextInt();
    Map<Strng,Integer> red = new HashMap<String,Integer>();
    for(int i = 0; i < m; i++){
      String str = sc.next();
      if(red.contains(str)){
        int count = red.ger(str) + 1;
        red.put(str,count);
      }
      else{
        red.put(str,0);
      }
    }
    int ans = 0;
    for(String i:blue.keySet()){
      int temp;
      if(red.countains(i)){
        temp = blue - red;
      }
      else{
        temp = blue;
      }
      if(ans < temp){
        ans = temp;
      }
    }
    if(ans <= 0){
      System.out.println(0);
    }
    else{
      System.out.println(ans);
    }
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
      if(blue.contains(str)){
             ^
  symbol:   method contains(String)
  location: variable blue of type Map<String,Integer>
Main.java:18: error: cannot find symbol
    Map<Strng,Integer> red = new HashMap<String,Integer>();
        ^
  symbol:   class Strng
  location: class Main
Main.java:36: error: incompatible types: Map<String,Integer> cannot be converted to int
        temp = blue;
               ^
3 errors
Language: C++

from collections import Counter

N = Counter([input() for _ in range(int(input()))])
M = Counter([input() for _ in range(int(input()))])
print(max(N[key]-M[key] for key in N.keys()))


Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from collections import Counter
      | ^~~~
Language: C++

#include<iostream>
#include<vector>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
using namespace std;
int main(void){
    int n , m ;
    cin >> n ;
    vector<string> a(n) ;
    cin >> m ;
    vector<string> b(m) ;

    for(int i = 0 ; i < n ; i++){
        cin >> a.at(i); ;
    }
    for(int j = 0 ; j < m ; j++){
        cin >> b.at(i); ;
    }

    int c  = 0 ;
    for (int i = 0; i < n; i++) {
    int count = 0;
    string X = a.at(i);
    for (int k = 0; k < n; k++) {
      if (a.at(k) == X) {
        count++;
      }
    }
    for (int j = 0; j < m; j++) {
      if (b.at(j) == X) {
        count--;
      }
    }
    if (count > c) {
      c = count;
    }
  }
 
  
  cout << c;



    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: 'i' was not declared in this scope
   19 |         cin >> b.at(i); ;
      |                     ^
Language: C++

#include<iostream>
#include<string>
#include<map>
using namespace std;
int main(){
  map<string,int> data;
int i;
int N;
cin>>N;
string a[N];
for(i=0;i<N;i++){
cin>>a[i]; 
data[a[i]]++;}
  int M;
cin>>M;
string b[M];
for(i=0;i<M;i++){
cin>>b[i];
  data[b[i]]--;
}  
  int ans=0;
  for(auto itr:data){
  int res=max(ans,itr.second);}
  cout<<res;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'res' was not declared in this scope
   24 |   cout<<res;
      |         ^~~
Language: C++

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

int main(){
  int N,M;
  cin >> N;
  vector<string> s(N);
  rep(i,N)
    cin >> s.at(i);
  cin >> M;
  rep(i,M)
    cin >> t.at(i);
  vector<int> sum(N);
  
  rep(i,N){
    rep(j,N){
      if(s.at(i)==s.at(j)){
        if(i==j) continue;
        sum.at(i)++;
      }
    } 
    rep(j,M){
      if(s.at(i)==t.at(j))
        sum.at(i)--;
    }
  }

  int result = sum.at(0);

  rep(i,N){
    if(result<sum.at(i))
      result = sum.at(i);
  }
  
  if(result<=0)
    cout << 0 << endl;
  else
    cout << result << endl;
    
  
  
  
  
  
    
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 't' was not declared in this scope
   13 |     cin >> t.at(i);
      |            ^
a.cc:24:19: error: 't' was not declared in this scope
   24 |       if(s.at(i)==t.at(j))
      |                   ^
Language: C++

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

int main(){
  int N,M;
  cin >> N;
  vector<string> s(N);
  rep(i,N)
    cin >> s.at(i);
  cin >> M;
  rep(i,M)
    cin >> t.at(i);
  vector<int> sum(N);
  
  rep(i,N){
    rep(j,N){
      if(s.at(i)==s.at(j)){
        if(i==j) continue;
        sum.at(i)++;
      }
    } 
    rep(j,M){
      if(s.at(i)==t.at(j))
        sum.at(i)--;
    }
  }

  int result = sum.at(0);

  rep(i,N){
    if(result<sum.at(i))
      result = sum.at(i);
  }
  
  if(result<=0)
    cout << 0 << endl;
  else
    cout << result << endl;
    
  
  
  
  
  
    
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:37: error: expected ';' before ')' token
    3 | #define rep(i,n) for(int i=0;i<n,i++)
      |                                     ^
a.cc:9:3: note: in expansion of macro 'rep'
    9 |   rep(i,N)
      |   ^~~
a.cc:3:37: error: expected ';' before ')' token
    3 | #define rep(i,n) for(int i=0;i<n,i++)
      |                                     ^
a.cc:12:3: note: in expansion of macro 'rep'
   12 |   rep(i,M)
      |   ^~~
a.cc:13:12: error: 't' was not declared in this scope
   13 |     cin >> t.at(i);
      |            ^
a.cc:3:37: error: expected ';' before ')' token
    3 | #define rep(i,n) for(int i=0;i<n,i++)
      |                                     ^
a.cc:16:3: note: in expansion of macro 'rep'
   16 |   rep(i,N){
      |   ^~~
a.cc:3:37: error: expected ';' before ')' token
    3 | #define rep(i,n) for(int i=0;i<n,i++)
      |                                     ^
a.cc:17:5: note: in expansion of macro 'rep'
   17 |     rep(j,N){
      |     ^~~
a.cc:3:37: error: expected ';' before ')' token
    3 | #define rep(i,n) for(int i=0;i<n,i++)
      |                                     ^
a.cc:23:5: note: in expansion of macro 'rep'
   23 |     rep(j,M){
      |     ^~~
a.cc:24:19: error: 't' was not declared in this scope
   24 |       if(s.at(i)==t.at(j))
      |                   ^
a.cc:3:37: error: expected ';' before ')' token
    3 | #define rep(i,n) for(int i=0;i<n,i++)
      |                                     ^
a.cc:31:3: note: in expansion of macro 'rep'
   31 |   rep(i,N){
      |   ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <stack>
#include <set>
#include <map>
#include <math.h>
#include <queue>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define Sort(Array) sort(Array.begin(), Array.end())
#define rev(a) reverse(a.begin(), a.end())
#define out(ans) cout << ans << endl;
const int MOD = 1000000007;
const int INF = INT_MAX;





int main() {

    int n, m;
    cin >> n;
    string s[n];
    rep(i,n) cin >> s[i];
    cin >> m;
    string t[m];
    rep(i,m) cin >> t[i];

    int ans = 0;
    rep(i,n) {
        int tmp = 0;
        rep(j, n) {
            if (s[i] == s[j]) ++tmp;
        }
        rep(j,m) {
            if (s[i] == t[j]) --tmp;
        }
        ans = max(ans, tmp);
    }


    out(ans);

    return 0;
}




//              g++ -std=c++1z






Compiler output:
a.cc:17:17: error: 'INT_MAX' was not declared in this scope
   17 | const int INF = INT_MAX;
      |                 ^~~~~~~
a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    8 | #include <queue>
  +++ |+#include <climits>
    9 | using namespace std;
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 max = 0;
  
  int score = 0;
  
  string moji;
  
  for (int i=0; i<N; i++){
  
    moji = s.at(i);
  	for (int i=0; i<N; i++){
  		if (s.at(i) == moji) score++;
  	}
   	for (int i=0; i<M; i++){
    	if (t.at(i) == moji) score--;
    }
    max=max(max,score);
    
  }
  
  cout << max << endl;
		
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:12: error: 'max' cannot be used as a function
   34 |     max=max(max,score);
      |         ~~~^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rep1(i,n) for (int i = n-1; i >= 0; --i)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vc = vector<char>;
using vb = vector<bool>;
using vd = vector<double>;
using in = int64_t;
using P=pair<in,in>;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string s,t;

int main(){
    map<string,int> mp;
    int n,m;
    string s;
    cin >> n;
    rep(i,n){
        cin >> s;
        map[s]++;
    }

    cin >> m;
    rep(i,m){
        cin >> s;
        map[s]--;
    }

    int ans = 0;
    for(auto p : ma){
        ans = max(ans,p.second);
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: expected initializer before '++' token
   25 |         map[s]++;
      |               ^~
a.cc:25:15: error: expected ';' before '++' token
a.cc:31:15: error: expected initializer before '--' token
   31 |         map[s]--;
      |               ^~
a.cc:31:15: error: expected ';' before '--' token
a.cc:35:18: error: 'ma' was not declared in this scope; did you mean 'm'?
   35 |     for(auto p : ma){
      |                  ^~
      |                  m
Language: C++

#include <bits/stdc++.h>
#include <string>

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 s[n];

    for(int i =0; i < m; i++){
        cin >> t[i];
    }
  
  int ans = 0;
  int count;
  for(int i=0;i<n;i++){
    for(int j=i;j<n;j++){
      if(s[i]==s[j])count++;
    }
    for(int k=0;k<m;k++){
      if(s[i]==t[k])count--;
    }
    if(ans<count)ans = count;
  }
    cout << count << endl;       
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: redeclaration of 'std::string s [n]'
   16 |     string s[n];
      |            ^
a.cc:9:12: note: 'std::string s [n]' previously declared here
    9 |     string s[n];
      |            ^
a.cc:19:16: error: 't' was not declared in this scope
   19 |         cin >> t[i];
      |                ^
a.cc:29:16: error: 't' was not declared in this scope
   29 |       if(s[i]==t[k])count--;
      |                ^
Language: C++

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

int main() {
  int N,M;
  cin >> N;
  int k=0;
  
  vector<string> s(N),t(M);
  
  for(int i=0;i<N;i++)
    cin >> s.at(i);
  
  cin >> M;
  
  for(int i=0;i<M;i++)
    cin >> t.at(i);
  
  for(int i=0;i<N;i++){
    string str = s.at(i)
      int l=0;
    for(int j=0;j<N;j++){
      if(s.at(j) == str)
        l++;
    }
    for(int j=0;j<M;j++){
      if(t.at(j) == str)
        l--;
    }
    k = max(k,l);
  }
  cout << k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected ',' or ';' before 'int'
   21 |       int l=0;
      |       ^~~
a.cc:24:9: error: 'l' was not declared in this scope
   24 |         l++;
      |         ^
a.cc:28:9: error: 'l' was not declared in this scope
   28 |         l--;
      |         ^
a.cc:30:15: error: 'l' was not declared in this scope
   30 |     k = max(k,l);
      |               ^
Language: C++

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

int main() {
  int N,M;
  cin >> N;
  int k=0;
  
  vector<string> s(N),t(M);
  
  for(int i=0;i<N;i++)
    cin >> s.at(i);
  
  cin >> M;
  
  for(int i=0;i<M;i++)
    cin >> t.at(i);
  
  for(int i=0;i<N;i++){
    string str = s.at(i);
      int l=0;
    for(int j=0;j<N;j++){
      if(s.at(j) == str)
        l++;
    }
    for(int j=0;j<M;j++){
      if(t.at(j) == str)
        l--
    }
    k = max(k,l);
  }
  cout << k << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: expected ';' before '}' token
   28 |         l--
      |            ^
      |            ;
   29 |     }
      |     ~
Language: C++

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

int main() {
  int N,M;
  cin >> N;
  int k=0;
  
  vector<string> s(N),t(M);
  
  for(int i=0;i<N;i++)
    cin >> s.at(i);
  
  cin >> M;
  
  for(int i=0;i<M;i++)
    cin >> t.at(i);
  
  for(int i=0;i<N;i++){
    string str = s.at(i)
      int l=0;
    for(int j=0;j<N;j++){
      if(s.at(j) == str)
        l++;
    }
    for(int j=0;j<M;j++){
      if(t.at(j) == str)
        l--
    }
    k = max(k,l);
  }
  cout << k << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:7: error: expected ',' or ';' before 'int'
   21 |       int l=0;
      |       ^~~
a.cc:24:9: error: 'l' was not declared in this scope
   24 |         l++;
      |         ^
a.cc:28:9: error: 'l' was not declared in this scope
   28 |         l--
      |         ^
a.cc:30:15: error: 'l' was not declared in this scope
   30 |     k = max(k,l);
      |               ^
Language: C++

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

int main(int argc, char* argv[]){
	int n,m;
	cin >> n;
	vector<string> s(n,0);
	for(int i=0;i<n;++i) cin >> s[i];
	cin >> m;
	vector<string> t(m,0);
	for(int i=0;i<m;++i) cin >> t[i];
	
	vector<int> a(n, 0);
	for(int i=0;i<n;++i){
		int cnt=0;
		for(int j=0;j<m;++j){
			if(s[i]==t[j]) --cnt;
			else { ++cnt; break;}
		}
		a.at(i)=cnt;
	}
	sort(a.begin(),a.end());
	if(ans<0) cout << 0 << endl;
	else cout << a[a.size()-1] << endl;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:23:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |         if(ans<0) cout << 0 << endl;
      |            ^~~
      |            abs
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);
    }
    sort(s.begin(),s.end());
    vector<int> com(n);
    com.at(0)=1;
    for(int i=1;i<n;i++){
        if(s.at(i)==s.at(i-1)){
            com.at(i)=com.at(i-1)+1;
        }
        else{
            com.at(i)=1;
        }
    }
    cin >> m;
    vector<string> t(m):
    for(int i=0;i<m;i++){
        cin >> t.at(i);
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++){
            if(s.at(i)==t.at(j)){
                com.at(i)--;
            }
        }
    }
    sort(com.begin(),com.end());
    cout << max(0,com.at(n-1)) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: expected ',' or ';' before ':' token
   23 |     vector<string> t(m):
      |                        ^
a.cc:24:17: error: 'i' was not declared in this scope
   24 |     for(int i=0;i<m;i++){
      |                 ^
Language: C++

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

int main()
{
  int N, M;
  cin >> N;
  vector<string> blue(N);
  for(int i = 0; i < N; i++)
    cin >> blue.at(i);
  cin >> M;
  vector<string> red(M);
  for(int i = 0; i < M; i++)
    cin >> red.at(i);
  
  int res;
  int maxres = 0;
  for(int i = 0; i < N; i++)
  {
    res = 0;
    for(int j = 0; j < N; j++)
    {
      if(blue.at(j) == blue.at(i))
        res++;
    }
    for(int j = 0; j < M; j++)
    {
      if(red.at(j) == blue.at(i))
        res--;
    }
    if(res > maxres)
      maxres = res;
  }
  cout << maxres << endl;
  
  }
}

Compiler output:
a.cc:37:1: error: expected declaration before '}' token
   37 | }
      | ^
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(i);
  
  cin>>M;
  vector<string> B(M);
  for(int i=0;i<N;i++)
    cin>>B.at(i);
  
  int max=0;
  for(int i=0;i<N;i++){
    int point;
    for(int j=0;j<N;i++){
      if(A.at(i)==A.at(j))
        point++
    }
    for(int j=0;j<M;i++){
      if(A.at(i)==B.at(j))
        point--
    }
    if(point>max)
      max=point;
  }
  
  cout<<max<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:22:16: error: expected ';' before '}' token
   22 |         point++
      |                ^
      |                ;
   23 |     }
      |     ~           
a.cc:26:16: error: expected ';' before '}' token
   26 |         point--
      |                ^
      |                ;
   27 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vc = vector<char>;
using vvc = vector<vc>;
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
int main(){
  ll n,m;
  cin>>n;
  map<string,ll> ao;
  map<string,ll> aka;
  rep(i,n){
    string s;
    cin>>s;
    ao[s]++;
  }
  cin>>m;
  rep(i,m){
    string s;
    cin>>s;
    aka[s]++;
  }
  ll ans=0;
  for(auto p:ao){
    ll k=p.S;
    string h=p.S;
    if(aka.count(h)){
      k-=aka[h];
    }
    ans=max(ans,k);
  }
  COUT(ans);
}
                   

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: conversion from 'long long int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   14 | #define S second
      |           ^
a.cc:59:16: note: in expansion of macro 'S'
   59 |     string h=p.S;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
  
  int n,m;
  int i,j,score,score_j;
  
  cin>>n;
  vector<string> s(n,"");
  for(i=0;i<n;i++) cin>>s.at(i);

  cin>>m;
  vector<string> t(m,"");
  for(i=0;i<m;i++) cin>>t.at(i);
  
  for(j=0;j<n;j++){
    for(i=0;i<n;i++)if(s.at(j)==s.at(i)){score_j++;
    for(i=0;i<m;i++)if(s.at(j)==t.at(i)){score_j--;
    if(score<score_j)score=score_j;
  }
                                         
  for(j=0;j<m;j++){
    for(i=0;i<n;i++)if(t.at(j)==s.at(i))score_j++;
    for(i=0;i<m;i++)if(t.at(j)==t.at(i))score_j--;
    if(score<score_j)score=score_j;
  }
  cout<<score;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:16:19: note: to match this '{'
   16 |   for(j=0;j<n;j++){
      |                   ^
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

#include<iostream>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<map>
#include<set>
#define debug(a) cout << "*" << a << "*" << endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
char s[15];
map<string, int> mp;
map<string, int>::iterator it;
int n, m;
int main()
{	
	while (~scanf("%d", &n))
	{
		//string mxstr = "axiba";
		int mx = 0;
		mp.clear();
		for (int i = 0; i < n; i++)
		{
			scanf("%s", s);
			mp[s]++;
		}
		scanf("%d", &m);
		for (int i = 0; i < m; i++)
		{
			scanf("%s", s);
			mp[s]--;
		}
		for (it = mp.begin(); it != mp.end(); it++)
		{
			if (it->second >= mx)
				//mx = it->second;
				mxstr = it->first;
		}
		printf("%d\n", mx);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:33: error: 'mxstr' was not declared in this scope
   39 |                                 mxstr = it->first;
      |                                 ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;
  string s,t;
  
  cin >> N;
  for(int i=0;i<N;i++)
    cin >> s.at(i);
  cin >> M;
  for(int i=0;i<M;i++)
    cin >> t.at(i);
  int score = 0;
  for(int i=0;i<N;i++){
    int count = 0;
    for(int j=0;j<N;j++){
      if(s.at(j) == s.at(j))
        count++;
    }
    for(int j=0;j<M;j++){
      if(s.at(j) == t.at(j))
        count--;
    }
    score = max(score,max);
  }
  cout << score << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: no matching function for call to 'max(int&, <unresolved overloaded function type>)'
   24 |     score = max(score,max);
      |             ~~~^~~~~~~~~~~
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: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:36: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const int&'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |                         ~~~~~~~~~~~^~~
/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:24:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |     score = max(score,max);
      |             ~~~^~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,M;
  string s,t;
  
  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 score = 0;
  for(int i=0;i<N;i++){
    int count = 0;
    for(int j=0;j<N;j++){
      if(s[j] == s[j])
        count++;
    }
    for(int j=0;j<M;j++){
      if(s[j] == t[j])
        count--;
    }
    score = max(score,max);
  }
  cout << score << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
    9 |     cin >> s(i);
      |            ~^~~
a.cc:12:13: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   12 |     cin >> t(i);
      |            ~^~~
a.cc:24:16: error: no matching function for call to 'max(int&, <unresolved overloaded function type>)'
   24 |     score = max(score,max);
      |             ~~~^~~~~~~~~~~
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: 'constexpr const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = int]'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:36: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to 'const int&'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |                         ~~~~~~~~~~~^~~
/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:24:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |     score = max(score,max);
      |             ~~~^~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>


using namespace std;
 
int main(){
   int N,M;
   cin >> N;

   vector<string> blue(N);

   cin >> M;
   vector<string> red(M);


    map<string,int> s;
    for(int i = 0; i < N; i++){ cin >> blue[i]; s[blue[i]] += 1; }
   
    for(int i = 0; i < M; i++){ cin >> red[i]; s[red[i]] -= 1; }

   

    map<string,int>::iterator p;

    int max = 0; 
    for(p = s.begin(); p != s.end(); p++){
        if(max < p->second){max = p->secomd;}
        
    }

    cout << max;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:38: error: 'struct std::pair<const std::__cxx11::basic_string<char>, int>' has no member named 'secomd'; did you mean 'second'?
   27 |         if(max < p->second){max = p->secomd;}
      |                                      ^~~~~~
      |                                      second
Language: C++

#include<bits/stdc++.h>


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

    map<string,int>::iterator post;
    int max = 0;
    
    for(post = p.begin(); post != p.end(); post++){
        if(p->second > max) max = p->second;
    }

    

    cout << max;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: base operand of '->' has non-pointer type 'std::map<std::__cxx11::basic_string<char>, int>'
   26 |         if(p->second > max) max = p->second;
      |             ^~
a.cc:26:36: error: base operand of '->' has non-pointer type 'std::map<std::__cxx11::basic_string<char>, int>'
   26 |         if(p->second > max) max = p->second;
      |                                    ^~