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

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

int main(){
    int n;
    cin >> n;
    int ans = 0;
    string s[n];
    rep(i,n) cin >> a[i];
    int m;
    cin >> m;
    string t[m];
    rep(i,m) cin >> t[i];
    string r[n];
    sort(a.begin(),a.end());
    r[0] = a[0];
    rep(i,n){
        int j = 1;
        if(a[i] != a[i+1]) {
            r[j] = a[i+1];
            j++;
        }
    }
    rep(j,n){
        int cnt = 0;
        rep(i,max(n,m)){
            if(a[i] == r[j])cnt++;
            if(b[i] == r[j])cnt--;
        }
        ans = max(ans,cnt);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'a' was not declared in this scope
   12 |     rep(i,n) cin >> a[i];
      |                     ^
a.cc:18:10: error: 'a' was not declared in this scope
   18 |     sort(a.begin(),a.end());
      |          ^
a.cc:31:16: error: 'b' was not declared in this scope
   31 |             if(b[i] == r[j])cnt--;
      |                ^
Language: C++

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


int main() {
  int n,m;
  cin >> n;
  vector<int> s(n);
  rep(i,n) cin >> s[i];
  cin >> m;
  vector<int> t(m);
  rep(i,m) cin >> t[i];
  int ans = 0;
  rep(i,n){
    int score = 0;
    rep(j,n) if(s[j] == s[i]) score++;
    rep(j,m) if(s[j] == s[i]) score++;
    nas = max(ans,score);
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'nas' was not declared in this scope; did you mean 'ans'?
   20 |     nas = max(ans,score);
      |     ^~~
      |     ans
Language: C++

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


int main() {
  int n,m;
  cin >> n;
  rep(i,n) cin >> s[i];
  cin >> m;
  rep(i,m) cin >> t[i];
  int ans = 0;
  rep(i,n){
    int score = 0;
    rep(j,n) if(s[j] == s[i]) score++;
    rep(j,m) if(s[j] == s[i]) score++;
    nas = max(ans,score);
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: 's' was not declared in this scope
   10 |   rep(i,n) cin >> s[i];
      |                   ^
a.cc:12:19: error: 't' was not declared in this scope
   12 |   rep(i,m) cin >> t[i];
      |                   ^
a.cc:16:17: error: 's' was not declared in this scope
   16 |     rep(j,n) if(s[j] == s[i]) score++;
      |                 ^
a.cc:17:17: error: 's' was not declared in this scope
   17 |     rep(j,m) if(s[j] == s[i]) score++;
      |                 ^
a.cc:18:5: error: 'nas' was not declared in this scope; did you mean 'ans'?
   18 |     nas = max(ans,score);
      |     ^~~
      |     ans
Language: C++

#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'll' was not declared in this scope
   19 |         ll count = 0,ans = 0;
      |         ^~
a.cc:23:38: error: no post-increment operator for type
   23 |                                 count++;
      |                                      ^~
a.cc:28:38: error: no post-decrement operator for type
   28 |                                 count--;
      |                                      ^~
a.cc:31:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |                 ans = max(ans, count);
      |                 ^~~
      |                 abs
a.cc:33:25: error: overloaded function with no contextual type information
   33 |                 count = 0;
      |                         ^
a.cc:35:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

#include <math.h>

#include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }

int main() {
  string s[105], t[105];
  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 ans = 0;
  ll score = 0;
  for (int i = 0; i < N; i++) {
    for (int j = 0; i < N; j++) {
      if (s[j] == s[i]) score++;
    }
    for (int j = 0; j < M; j++) {
      if (t[j] == s[i]) score--;
    }
    ans = max(ans, score);
    score = 0;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:14: error: no matching function for call to 'max(int&, ll&)'
   27 |     ans = max(ans, score);
      |           ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/specfun.h:43,
                 from /usr/include/c++/14/cmath:3906,
                 from /usr/include/c++/14/math.h:36,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:27:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   27 |     ans = max(ans, score);
      |           ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/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:27:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   27 |     ans = max(ans, score);
      |           ~~~^~~~~~~~~~~~
Language: C++

#include <algorithm>
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }

int main() {
  string s[105], t[105];
  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 ans = 0;
  ll score = 0;
  for (int i = 0; i < N; i++) {
    for (int j = 0; i < N; j++) {
      if (s[j] == s[i]) score++;
    }
    for (int j = 0; j < M; j++) {
      if (t[j] == s[i]) score--;
    }
    ans = max(ans, score);
    score = 0;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: no matching function for call to 'max(int&, ll&)'
   25 |     ans = max(ans, score);
      |           ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:25:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   25 |     ans = max(ans, score);
      |           ~~~^~~~~~~~~~~~
/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:25:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   25 |     ans = max(ans, score);
      |           ~~~^~~~~~~~~~~~
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++){
    cin >>blue[i];
     }
  
  int m;
  cin >>m;
  vector<string> red(m);
   for(int i=0;i<m;i++){
    cin >>red[i];
     }
   
  int ans=0;
  for(int i=0;i<n;i++){
    int count=0;
    if(i>0){ 
      int stop=0;
     for(int j=0;j<i;j++){
       if(blue[i]==blue[j]){stop=1; break;}
     }
   }
    if(stop==1){break;}
    
    for(int che=i;che<n;che++){
      if(blue[i]==blue[che]){count++;}
    }
     for(int che=0;che<m;che++){
      if(blue[i]==red[che]){count--;}
    }
    
    if(ans<count){ans = count;}
  }
  cout << ans<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:8: error: 'stop' was not declared in this scope
   28 |     if(stop==1){break;}
      |        ^~~~
Language: C++

package main

import (
  "fmt"
)

func maxInt(a ...int) int {m := a[0]; for _, x := range a {if x > m {m = x}}; return m}
func minInt(a ...int) int {m := a[0]; for _, x := range a {if x < m {m = x}}; return m}

func main() {
  var n int 
  fmt.Scan(&n)
  res := make(map[string]int)
  for i := 0; i < n; i++ {
    var s string 
    fmt.Scan(&s)
    res[s]++
  }
  var m int 
  fmt.Scan(&m)
  for i := 0; i < m; i++ {
    var t string 
    fmt.Scan(&t)
    res[t]--
  }
  ans := 0
  for _, c := range res {
    ans = maxInt(ans, c)
  }
  fmt.Println(ans)
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:8:1: error: 'func' does not name a type
    8 | func minInt(a ...int) int {m := a[0]; for _, x := range a {if x < m {m = x}}; return m}
      | ^~~~
a.cc:10:1: error: 'func' does not name a type
   10 | func main() {
      | ^~~~
Language: C

#include <bits / stdc ++。h>

typedef long long ll;
#define rep（i、n）for（ll i = 0; i <（ll）（n）; ++ i）



int main（）{
    int n; cin >> n;
    tmp;
    map <string、int> ma;
    rep（i、n）{
        cin >> tmp;
        ma [tmp] ++;
    }
    int m; cin >> m;
    rep（i、m）{
        cin >> tmp;
        ma [tmp]-;
    }

    int ans = 0;
    for（auto itr：ma）{
        ans = max（itr.second、ans）;
    }

    cout << ans << endl;

    
}

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

#include <bits / stdc ++
typedef long long ll;
#define rep（i、n）for（ll i = 0; i <（ll）（n）; ++ i）



int main（）{
    int n; cin >> n;
    文字列tmp;
    map <string、int> ma;
    rep（i、n）{
        cin >> tmp;
        ma [tmp] ++;
    }
    int m; cin >> m;
    rep（i、m）{
        cin >> tmp;
        ma [tmp]-;
    }

    int ans = 0;
    for（auto itr：ma）{
        ans = max（itr.second、ans）;
    }

    cout << ans << endl;

    0を返します。
    
}

Compiler output:
main.c:1:25: error: missing terminating > character
    1 | #include <bits / stdc ++
      |                         ^
main.c:1:10: fatal error: bits / stdc ++: No such file or directory
    1 | #include <bits / stdc ++
      |          ^
compilation terminated.
Language: C

#include <bits / stdc ++。h>

名前空間stdを使用します。
typedef long long ll;
#define rep（i、n）for（ll i = 0; i <（ll）（n）; ++ i）



int main（）{
    int n; cin >> n;
    文字列tmp;
    map <string、int> ma;
    rep（i、n）{
        cin >> tmp;
        ma [tmp] ++;
    }
    int m; cin >> m;
    rep（i、m）{
        cin >> tmp;
        ma [tmp]-;
    }

    int ans = 0;
    for（auto itr：ma）{
        ans = max（itr.second、ans）;
    }

    cout << ans << endl;

    0を返します。
    
}

Compiler output:
main.c: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;
 typedef long long ll;
 #define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
 
 
 
 int main() {
     int n; cin >> n;
     string tmp;
     map<string, int> ma;
     rep(i, n) {
         cin >> tmp;
         ma[tmp]++;
     }
     int m; cin >> m;
     rep(i, m) {
         cin >> tmp;
         ma[tmp]--;
     }
 
     int ans = 0;
     for(auto itr : ma) {
         ans = max(itr.second, ans);
     }
 
     cout << ans << endl;
 
     return 0;
     
 }

Compiler output:
main.c:1:9: 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;
 typedef long long ll;
 #define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
 
 
 
 int main() {
     int n; cin >> n;
     string tmp;
     map<string, int> ma;
     rep(i, n) {
         cin >> tmp;
         ma[tmp]++;
     }
     int m; cin >> m;
     rep(i, m) {
         cin >> tmp;
         ma[tmp]--;
     }
 
     int ans = 0;
     for(auto itr : ma) {
         ans = max(itr.second, ans);
     }
 
     cout << ans << endl;
 
     return 0;
     
 }

Compiler output:
main.c:1:9: 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;
  cin >> N;
  vector<string> blue(N);
  for (int i=0; i<N; i++) {
  cin >> blue.at(i);
  }
  
  int M;
  cin >> M;
  vector<string> red(M);
  for (int i=0; i<M; i++) {
  cin >> red.at(i);
  }
  
  vector<int> yen(N);
  for (int i=0; i<N; i++) {
    for (int j=0; j<N; j++) {
      if (blue.at(i)==blue.at(j)) {
      yen.at(i)++;
      }
    }
    for (int j=0; j<M; j++) {
      if (blue.at(i)==red.at(j)) {
      yen.at(i)--;
      }
    }
  }
  

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  
  int  n,m;
  
  cin>>n>>m;
  
  int aoi[n];
  int aka[m];
  
  vector<string> s(n);
  vector<string> t(m);
  string hikaku;
  for(int i=0;i<n;i++)
  {
      cin>>s.at(i);
  }
   for(int j=0;j<m;j++)
  {
      cin>>t.at(j);
  }
  
  int r=0,en[n];
  for(int i=0;i<n;i++)
       en[i]=0;
  
  for(int c=0;c<n;c++)
  {
      hikaku=s.at(c);
      for(int g=0;g<n;g++)
      {
         if(hikaku==s.at(g))
         {
             en[r]+=1;
             
         }
        
      }
     for(int y=0;y<m;y++)
        {
        　if(hikaku==t.at(y))
         {
              en[r]-=1;
         }
        }
     r++;
  }
  
   int saidai=0;
   for(int i=0;i<n;i++)
   {
      if(saidai<en[i])
      {
          saidai=en[i];
      }
   }
 
  cout<<saidai<<endl;
 
}

Compiler output:
a.cc:43:9: error: extended character 　 is not valid in an identifier
   43 |         　if(hikaku==t.at(y))
      |         ^
a.cc: In function 'int main()':
a.cc:43:9: error: '\U00003000if' was not declared in this scope
   43 |         　if(hikaku==t.at(y))
      |         ^~~~
Language: C++

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

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

void init() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
}

map<string, int> z;

void solve() {
    int n; cin >> n;
    for (int i = 0; i < n; ++i) {
        string s; cin >> s;
        ++z[s];
    }
    int m; cin >> m;
    for (int i = 0; i < m; ++i) {
        string s; cin >> s;
        --z[s];
    }
    int ans = 0;
    for (const auto &e: m) {
        ans = max(ans, e.second);
    }
    cout << ans;
}

int main() {
    init();
    int t = 1; //scanf("%d", &t);
    while (t--) {
        solve();
    }
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:29:25: error: 'begin' was not declared in this scope
   29 |     for (const auto &e: m) {
      |                         ^
a.cc:29:25: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:29:25: error: 'end' was not declared in this scope
   29 |     for (const auto &e: m) {
      |                         ^
a.cc:29:25: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

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

int main() {
  int m,n;
  int value=0;
  cin >> m;
  vector<string> blue(m);
  for(int i=0;i<m;i++){
    cin >> blue.at(i);
  }
  
  cin >>n;
  vector<string> red(n)
  for(int i=0;i<n;i++){
    cin >> red.at(i);
  }
  
  for(int i=0;i<m;i++){
    int cnt=0;
    for(int j=0;j<m;j++){
      if(blue.at(i)==blue.at(j))
        cnt++;
      if(blue.at(i)==red.at(j))
        cnt--;
    }
    value=max(value,cnt);
  }
  cout << value <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: expected ',' or ';' before 'for'
   15 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:15:15: error: 'i' was not declared in this scope
   15 |   for(int i=0;i<n;i++){
      |               ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<string> a(N+1);
  int i,j;
  
  //N dainyu-
  for(i=1;i<N+1;i++)
    cin >> a.at(i);
  
  int M;
  cin >> M;
  vector<string> b(M+1);
  
  //M dainyu-
  for(i=1;i<M+1;i++)
    cin >> b.at(i);

  //
  int max=0;
    for(i=1;i<N+1;i++){
      int count=1;
      if(a.at(i)!="0"){
        for(j=1;j<N+1;j++){
          if(a.at(i)==a.at(j)&&i!=j){
            count++;
            a.at(j)=0;
          }
        }
        for(j=1;j<M+1;j++){
          if(a.at(i)==b.at(j))
            count--;
        }
      }
      if(count>max)max=count;
    }
  cout<<max<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:21: error: ambiguous overload for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   30 |             a.at(j)=0;
      |                     ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  817 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  828 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  840 |       operator=(_CharT __c)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  858 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<string> a(N+1);
  int i,j;
  
  //N dainyu-
  for(i=1;i<N+1;i++)
    cin >> a.at(i);
  
  int M;
  cin >> M;
  vector<string> b(M+1);
  
  //M dainyu-
  for(i=1;i<M+1;i++)
    cin >> b.at(i);

  //
  int max=0;
    for(i=1;i<N+1;i++){
      int count=0;
      if(a.at(i)!="0"){
        for(j=1;j<N+1;j++){
          if(a.at(i)==a.at(j)&&i!=j){
            count++;
            a.at(j)=0;
          }
        }
        for(j=1;j<M+1;j++){
          if(a.at(i)==b.at(j))
            count--;
        }
      }
      if(count>max)max=count;
    }
  cout<<max<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:21: error: ambiguous overload for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   30 |             a.at(j)=0;
      |                     ^
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  817 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  828 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  840 |       operator=(_CharT __c)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  858 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<string> a(N+1);
  int i;
  
  //N dainyu-
  for(i=1;i<N+1;i++)
    cin >> a.at(i);
  
  int M;
  cin >> M;
  vector<string> b(M+1);
  
  //M dainyu-
  for(i=1;i<M+1;i++)
    cin >> b.at(i);

  //
  int max=0;
    for(i=1;i<N+1;i++){
      int count=0;
      if(a.at(i)!="0"){
        for(j=1;j<N+1;j++){
          if(a.at(i)==a.at(j)&&i!=j){
            count++;
            a.at(j)=0;
          }
        }
        for(j=1;j<M+1;j++){
          if(a.at(i)==b.at(j))
            count--;
        }
      }
      if(count>max)max=count;
    }
  cout<<max<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: 'j' was not declared in this scope
   27 |         for(j=1;j<N+1;j++){
      |             ^
a.cc:33:13: error: 'j' was not declared in this scope
   33 |         for(j=1;j<M+1;j++){
      |             ^
Language: C++

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

int main() {
  int a,b;
  int value=0;
  cin >> a;
  map<string,int> mp;
  for(int i=0;i<a;i++){
    string t;  cin >>t;
    mp[t]++;
  }
  cin >>b;
  for(int i=0;i<b;i++){
    string t; cin >>t;
    mp[t]--;
  }
  for(auto t:mp){
    value =max(max,t.second);
  }
  cout <<value <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: no matching function for call to 'max(<unresolved overloaded function type>, int&)'
   19 |     value =max(max,t.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: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:20: note:   no known conversion for argument 1 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:19:15: note:   couldn't deduce template parameter '_Tp'
   19 |     value =max(max,t.second);
      |            ~~~^~~~~~~~~~~~~~
Language: C++

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

int main() {
  int a,b;
  int value=0;
  cin >> a;
  map<string,int> mp;
  for(int i=0;i<a;i++){
    string t;  cin >>t;
    mp[t]++;
  }
  cin >>b;
  for(int i=0;i<b;i++){
    strin t; cin >>t;
    mp[t]--;
  }
  for(auto t:mp){
    value =max(max,t.second);
  }
  cout <<value <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'strin' was not declared in this scope; did you mean 'stdin'?
   15 |     strin t; cin >>t;
      |     ^~~~~
      |     stdin
a.cc:15:20: error: 't' was not declared in this scope
   15 |     strin t; cin >>t;
      |                    ^
a.cc:19:15: error: no matching function for call to 'max(<unresolved overloaded function type>, int&)'
   19 |     value =max(max,t.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: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:20: note:   no known conversion for argument 1 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:19:15: note:   couldn't deduce template parameter '_Tp'
   19 |     value =max(max,t.second);
      |            ~~~^~~~~~~~~~~~~~
Language: C++

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

int main() {
  int a,b;
  int max=0;
  cin >>a;
  vector<string> blue(a);
  
  for(int i=0;i<a;i++){
    cin >> blue.at(i);
  }
  
  cin >>b;
  vector<sting> red(b);
  for(int i=0;i<b;i++){
    cin >> red.at(i);
  }
  
  for(int i=0;i<a;i++){
    int cnt =0;
    for(int j=0;j<a;j++){
      if(blue.at(i)==blue.at(j))
        cnt++;
    }
    for(int k=0;k<b;k++){
      if(blue.at(i)==red.at(k))
        cnt--;
    }
    max=max(max,cnt);
  }
  cout << max <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'sting' was not declared in this scope
   15 |   vector<sting> red(b);
      |          ^~~~~
a.cc:15:15: error: template argument 1 is invalid
   15 |   vector<sting> red(b);
      |               ^
a.cc:15:15: error: template argument 2 is invalid
a.cc:17:16: error: request for member 'at' in 'red', which is of non-class type 'int'
   17 |     cin >> red.at(i);
      |                ^~
a.cc:27:26: error: request for member 'at' in 'red', which is of non-class type 'int'
   27 |       if(blue.at(i)==red.at(k))
      |                          ^~
a.cc:30:12: error: 'max' cannot be used as a function
   30 |     max=max(max,cnt);
      |         ~~~^~~~~~~~~
Language: C++

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

int main(){
    int N = 0,M = 0;
    int counter = 0;
    int ans = -100;
    vector<string> blue(1000);
    vector<string> red(1000);


    cin >> N;

    rep(i,N){
        cin >> blue.at(i);
    }

    cin >> M;

    rep(i,M){
        cin>>red.at(i);  
    }

    rep(i,blue.size()){

        rep(j,blue.size()){
            if(blue.at(k)==blue(i)) couter++;
        }
        rep(k,red.size()){
            if(red.at(j)==blue.at(i)) counter--;
        }

        if(counter>ans) ans=counter;
        
    }

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:24: error: 'k' was not declared in this scope
   29 |             if(blue.at(k)==blue(i)) couter++;
      |                        ^
a.cc:29:32: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   29 |             if(blue.at(k)==blue(i)) couter++;
      |                            ~~~~^~~
a.cc:29:37: error: 'couter' was not declared in this scope; did you mean 'counter'?
   29 |             if(blue.at(k)==blue(i)) couter++;
      |                                     ^~~~~~
      |                                     counter
a.cc:32:23: error: 'j' was not declared in this scope
   32 |             if(red.at(j)==blue.at(i)) counter--;
      |                       ^
Language: C++

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

int main() {
  int N, M;
  
  cin >> N;
  vector<int> vec_1(N);
  for (int i=0; i<N; i++) 
    cin >> vec_1.at(i);
  
  cin >> M;
  vector<int> vec_2(M);
  for (int i=0; i<M; i++) 
    cin >> vec_2.at(i);
  
  int max = -100;
  for (int i=0; i<N; i++) {
    int counter = 0;
      
    for (int s=0; s<N; s++) {
      if vec_1.at(i) == vec_1.at(s)
        counter++;
    }
    
    for (int t=0; t<M; t++) {
      if vec_2.at(i) == vec_2.at(t)
        counter--;
    }
    
    if (max < counter)
      max = counter;
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: expected '(' before 'vec_1'
   22 |       if vec_1.at(i) == vec_1.at(s)
      |          ^~~~~
      |          (
a.cc:27:10: error: expected '(' before 'vec_2'
   27 |       if vec_2.at(i) == vec_2.at(t)
      |          ^~~~~
      |          (
Language: C++

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

int main() {
  int N, M;
  
  cin >> N;
  vector<int> vec_1(N);
  for (int i=0; i<N; i++) 
    cin >> vec_1.at(i);
  
  cin >> M;
  vector<int> vec_2(M);
  for (int i=0; i<M; i++) 
    cin >> vec_2.at(i);
  
  int max = -100;
  for (int i=0; i<N; i++) {
    int counter = 0;
      
    for (int s=0; s<N; s++) {
      if vec.at(i) == vec.at(s)
        counter++;
    }
    
    for (int t=0; t<M; t++) {
      if vec.at(i) == vec.at(t)
        counter--;
    }
    
    if (max < counter)
      max = counter;
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:22:10: error: expected '(' before 'vec'
   22 |       if vec.at(i) == vec.at(s)
      |          ^~~
      |          (
a.cc:27:10: error: expected '(' before 'vec'
   27 |       if vec.at(i) == vec.at(t)
      |          ^~~
      |          (
Language: C++

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

int main() {
  int N, M;
  
  cin >> N;
  vector<int> vec_1(N)
  for (int i=0; i<N; i++) 
    cin >> vec_1.at(i);
  
  cin >> M;
  vector<int> vec_2(M)
  for (int i=0; i<M; i++) 
    cin >> vec_2.at(i);
  
  int max = -100
  for (int i=0; i<N; i++) {
    int counter = 0
      
    for (int s=0; s<N; s++) {
      if vec.at(i) == vec.at(s)
        counter++;
    }
    
    for (int t=0; t<M; t++) {
      if vec.at(i) == vec.at(t)
        counter--;
    }
    
    if (max < counter)
      max = counter
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i=0; i<N; i++)
      |   ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for (int i=0; i<N; i++)
      |                 ^
a.cc:14:3: error: expected ',' or ';' before 'for'
   14 |   for (int i=0; i<M; i++)
      |   ^~~
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for (int i=0; i<N; i++) {
      |   ^~~
Language: C++

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

int main() {
  int N, M;
  
  cin >> N;
  vector<int> vec_1(N)
  for (int i=0; i<N; i++) 
    cin >> vec_1.at(i);
  
  cin >> M;
  vector<int> vec_2(M)
  for (int i=0; i<M; i++) 
    cin >> vec_2.at(i);
  
  int max = -100
  for (int i=0; i<N; i++) {
    int counter = 0
      
    for (int s=0; s<N; i++) {
      if vec.at(i) == vec.at(s)
        counter++;
    }
    
    for (int t=0; t<M; i++) {
      if vec.at(i) == vec.at(t)
        counter--;
    }
    
    if (max < counter)
      max = counter
  }
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'for'
    9 |   for (int i=0; i<N; i++)
      |   ^~~
a.cc:9:17: error: 'i' was not declared in this scope
    9 |   for (int i=0; i<N; i++)
      |                 ^
a.cc:14:3: error: expected ',' or ';' before 'for'
   14 |   for (int i=0; i<M; i++)
      |   ^~~
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for (int i=0; i<N; i++) {
      |   ^~~
Language: C++

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

int main() {
  int N, M;
  
  cin >> N;
  vector<int> vec_1(N)
  for (int i=0; i<N; i++) 
    cin >> vec_1.at(i);
  
  cin >> M;
  vector<int> vec_2(M)
  for (int i=0; i<M; i++) 
    cin >> vec_2.at(i);
  
  int max = -100
  for (int i=0; i<N; i++) {
    int counter = 0
      
    for (int s=0; s<N; i++) {
      if vec.at(i) == vec.at(s)
        counter++;
    }
    
    for (int t=0; t<M; i++) {
      if vec.at(i) == vec.at(t)
        counter--;
    }
    
    if (max < counter)
      max = counter
  }
}
      

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

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

int main() {
  int n,m;
  cin >> n;
  vector<string> vn(n);
  rep(i,n){
    cin >> vec.at(i);
  }
  cin >> m;
  vector<string> vm(m);
  rep(i,n){
    cin >> vec.at(i);
  }
  
  int ans=0;
  rep(i,n){
    int count=0;
    rep(j,n){
      if(vn[i]==vn[j]){
        count++;
      }
    }
    rep(j,n){
      if(vn[i]==vm[j]){
        count--;
      }
    }
    if(count>ans){
      ans=count;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'vec' was not declared in this scope
   10 |     cin >> vec.at(i);
      |            ^~~
a.cc:15:12: error: 'vec' was not declared in this scope
   15 |     cin >> vec.at(i);
      |            ^~~
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

int main(){
	int N, M;
	cin >> N;
	vector<string> blues(N);
	vector<int> clist(N);
	
	for(int i = 0;i<N;i++){
		cin >> blues.at(i);
	}
	
	cin >> M;
	vector<string> reds(M);
	
	for(int j = 0;j<M;j++){
		cin >> reds.at(j);
	}
	
	int Mgain = 0;
	
	for(int k = 0;k<M;k++){
		if(clist.at(k) >0)
			continue;
		
		string bc = blues.at(k);
		int cnt = 1;
		
		for(int l = k+1;l<M;l++){
			if(bc == blues.at(l)){
				cnt++;
				clist.at(l)++;
			}
		}
		
		for(int m = 0;m<N;m++){
			if(bc == reds.at(m){
				cnt--;
			}
		}
		
		clist.at(k)++;
		if(Mgain<cnt)
			Mgain = cnt;
	}
	
	cout << Mgain << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:44: error: expected ')' before '{' token
   38 |                         if(bc == reds.at(m){
      |                           ~                ^
      |                                            )
a.cc:41:17: error: expected primary-expression before '}' token
   41 |                 }
      |                 ^
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);
  }
  vector<int> totalscore(N+M,0);
  for(int i=0;i<M+N;i++){
    for(int j=0;j<M+N;j++){
      if(i<N && j<N){
        if(s.at(i)==s.at(j))totalscore.at(i)++;
      }
      else if(i<N && j>=N){
        if(s.at(i)==s.at(j))totalscore.at(i)--;
      }
      else if(i>=N && j<N){
        if(s.at(i)==s.at(j))totalscore.at(i)++;
      }
      else{
        if(s.at(i)==s.at(j))totalscore.at(i)--;
      }
    }
  }
  cout << max(totalscore)
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,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);
  }
  vector<int> totalscore(N+M,0)
  for(int i=0;i<M+N;i++){
    for(int j=0;j<M+N;j++){
      if(i<N && j<N){
        if(s.at(i)==s.at(j))totalscore.at(i)++;
      }
      else if(i<N && j>=N){
        if(s.at(i)==s.at(j))totalscore.at(i)--;
      }
      else if(i>=N && j<N){
        if(s.at(i)==s.at(j))totalscore.at(i)++;
      }
      else{
        if(s.at(i)==s.at(j))totalscore.at(i)--;
      }
    }
  }
  cout << max(totalscore)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: expected ',' or ';' before 'for'
   17 |   for(int i=0;i<M+N;i++){
      |   ^~~
a.cc:17:15: error: 'i' was not declared in this scope
   17 |   for(int i=0;i<M+N;i++){
      |               ^
a.cc:33:14: error: no matching function for call to 'max(std::vector<int>&)'
   33 |   cout << max(totalscore)
      |           ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:33:14: note:   'std::vector<int>' is not derived from 'std::initializer_list<_Tp>'
   33 |   cout << max(totalscore)
      |           ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

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

string s[110],t[110];
int main(){
 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 ans=0
 for (int i=0;i<n;i++){
   int score = 0;
   for (int j=0;j<n;j++) if(s[j]==s[i]) score++;
   for (int j=0;j<n;j++) if(t[j]==s[i]) score--;
   ans = max(ans, score);
 }
  cout << ans << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:13:2: error: expected ',' or ';' before 'for'
   13 |  for (int i=0;i<n;i++){
      |  ^~~
a.cc:13:15: error: 'i' was not declared in this scope
   13 |  for (int i=0;i<n;i++){
      |               ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:2: error: expected ',' or ';' before 'if'
   11 |  if (s[i] == t[i]) same++;
      |  ^~
a.cc:13:17: error: expected ';' at end of input
   13 |   cout <<  -same
      |                 ^
      |                 ;
a.cc:13:17: error: expected '}' at end of input
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^