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

using namespace std;

int main(){
    int n;
    string tmps;
    cin >> n;
    map<string,int> vs(n);
    while(cin>>tmps){
        vs[tmps]++;
    }
    int maxnum=0;
    for(auto itr = vs,begin();itr!=vs.end();itr++){
       maxv=max(maxnum,*itr.second);
    }
    for(auto itr = vs.begin();itr!=vs.end();itr++){
        if(*itr.second == maxv) cout<<(*itr.first)<<enld;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string tmps;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:5: error: 'map' was not declared in this scope
    7 |     map<string,int> vs(n);
      |     ^~~
a.cc:1:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
  +++ |+#include <map>
    1 | using namespace std;
a.cc:7:16: error: expected primary-expression before 'int'
    7 |     map<string,int> vs(n);
      |                ^~~
a.cc:8:16: error: 'tmps' was not declared in this scope
    8 |     while(cin>>tmps){
      |                ^~~~
a.cc:9:9: error: 'vs' was not declared in this scope
    9 |         vs[tmps]++;
      |         ^~
a.cc:12:20: error: 'vs' was not declared in this scope
   12 |     for(auto itr = vs,begin();itr!=vs.end();itr++){
      |                    ^~
a.cc:13:8: error: 'maxv' was not declared in this scope
   13 |        maxv=max(maxnum,*itr.second);
      |        ^~~~
a.cc:13:13: error: 'max' was not declared in this scope
   13 |        maxv=max(maxnum,*itr.second);
      |             ^~~
a.cc:15:20: error: 'vs' was not declared in this scope
   15 |     for(auto itr = vs.begin();itr!=vs.end();itr++){
      |                    ^~
a.cc:16:27: error: 'maxv' was not declared in this scope
   16 |         if(*itr.second == maxv) cout<<(*itr.first)<<enld;
      |                           ^~~~
a.cc:16:33: error: 'cout' was not declared in this scope
   16 |         if(*itr.second == maxv) cout<<(*itr.first)<<enld;
      |                                 ^~~~
a.cc:16:33: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:53: error: 'enld' was not declared in this scope
   16 |         if(*itr.second == maxv) cout<<(*itr.first)<<enld;
      |                                                     ^~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define lop(i, n) for(i=0; i<n; i++)

int main()
{
	int N, i, max=0, cnt[200001];
	char s[200000][11];
	
	scanf("%d", &N);
	lop(i, N){
		scanf("%s", s[i]);
	}
	
	qsort(s, N, 11 ,strcmp);
	
	cnt[0]=1;
	for(i=1; i<N; i++){
		if(strcmp(s[i-1],s[i])==0){
			cnt[i]=cnt[i]+1;
		}
		else{
			cnt[i]=1;
			if(max<cnt[i-1]max=cnt[i-1];
		}
	}
	
	if(max<cnt[N-1]) max=cnt[N-1];
	lop(i, N){
		if(cnt[i]==max)printf("%s\n", s[i]);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:25: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   17 |         qsort(s, N, 11 ,strcmp);
      |                         ^~~~~~
      |                         |
      |                         int (*)(const char *, const char *)
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(const char *, const char *)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
main.c:26:40: error: expected ')' before 'max'
   26 |                         if(max<cnt[i-1]max=cnt[i-1];
      |                           ~            ^~~
      |                                        )
main.c:27:17: error: expected expression before '}' token
   27 |                 }
      |                 ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define lop(i, n) for(i=0; i<n; i++)

int main()
{
	int N, i;
	char s[200000][11];
	
	scanf("%d", &N);
	lop(i, N){
		scanf("%s", s[i]);
	}
	
	qsort(s,N,11,strcmp);
	
	cnt[0]=1;
	for(i=1; i<N; i++){
		if(strcmp(s[i-1],s[i])==0){
			cnt[i]=cnt[i]+1;
		}
		else{
			cnt[i]=1;
			if(max<cnt[i-1]max=cnt[i-1];
		}
	}
	
	if(max<cnt[N-1]) max=cnt[N-1];
	lop(i, N){
		if(cnt[i]==max)printf("%s\n", s[i]);
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:22: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   17 |         qsort(s,N,11,strcmp);
      |                      ^~~~~~
      |                      |
      |                      int (*)(const char *, const char *)
In file included from main.c:2:
/usr/include/stdlib.h:971:34: note: expected '__compar_fn_t' {aka 'int (*)(const void *, const void *)'} but argument is of type 'int (*)(const char *, const char *)'
  971 |                    __compar_fn_t __compar) __nonnull ((1, 4));
      |                    ~~~~~~~~~~~~~~^~~~~~~~
main.c:19:9: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
   19 |         cnt[0]=1;
      |         ^~~
      |         int
main.c:19:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:28: error: 'max' undeclared (first use in this function); did you mean 'fmax'?
   26 |                         if(max<cnt[i-1]max=cnt[i-1];
      |                            ^~~
      |                            fmax
main.c:26:40: error: expected ')' before 'max'
   26 |                         if(max<cnt[i-1]max=cnt[i-1];
      |                           ~            ^~~
      |                                        )
main.c:27:17: error: expected expression before '}' token
   27 |                 }
      |                 ^
Language: C++

#include <iostream>
#include <string>
#include<algorithm>
using namespace std;
int main(){
int N;
  cin>>N;
  string S[3*100000];
           for ( int i=0; i<N; i++) cin>>S[i];
     int counter[3*100000]={0};      
 for (int i=0; i<N; i++){
   for (int j=0; j<N; j++){
     if (S[i]==S[j]) counter[i]++;}
 }
           int maxcount=0;
  for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
           string B[3*100000];
  for (int i=0; i<N; i++){
    if (maxcount==counter[i]){
      B.push(S[i]);}}
          sort(B,B+3*100000);
           for (int i=0; i<N; i++){
             cout<<B[i]<<endl;}}
           
           
              

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: request for member 'push' in 'B', which is of non-class type 'std::string [300000]' {aka 'std::__cxx11::basic_string<char> [300000]'}
   20 |       B.push(S[i]);}}
      |         ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int N;
  cin>>N;
  string S[3*100000];
           for ( int i=0; i<N; i++) cin>>S[i];
     int counter[3*100000]={0};      
 for (int i=0; i<N; i++){
   for (int j=0; j<N; j++){
     if (S[i]==S[j]) counter[i]++;}
 }
           int maxcount=0;
  for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
           string B[3*100000];
  for (int i=0; i<N; i++){
    if (maxcount==counter[i]){
      B.push(S[i]);}}
          sort(B,B+3*100000);
           for (int i=0; i<N; i++){
             cout<<B[i]<<endl;}}
           
           
              

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: request for member 'push' in 'B', which is of non-class type 'std::string [300000]' {aka 'std::__cxx11::basic_string<char> [300000]'}
   19 |       B.push(S[i]);}}
      |         ^~~~
a.cc:20:11: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |           sort(B,B+3*100000);
      |           ^~~~
      |           short
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int N;
  cin>>N;
  string S[3*100000];
           for ( int i=0; i<N; i++) cin>>S[i];
     int counter[3*100000]={0};      
 for (int i=0; i<N; i++){
   for (int j=0; j<N; j++){
     if (S[i]==S[j]) counter[i]++}
 }
           int maxcount=0;
  for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
           string B[3*100000];
  for (int i=0; i<N; i++){
    if (maxcount==counter[i]){
      B.push(S[i]);}}
          sort(B,B+3*100000);
           for (int i=0; i<N; i++){
             cout<<B[i]<<endl;}}
           
           
              

Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: expected ';' before '}' token
   12 |      if (S[i]==S[j]) counter[i]++}
      |                                  ^
      |                                  ;
a.cc:19:9: error: request for member 'push' in 'B', which is of non-class type 'std::string [300000]' {aka 'std::__cxx11::basic_string<char> [300000]'}
   19 |       B.push(S[i]);}}
      |         ^~~~
a.cc:20:11: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |           sort(B,B+3*100000);
      |           ^~~~
      |           short
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int N;
  cin>>N;
  string S[3*100000];
           for ( int i=0; i<N; i++) cin>>S[i];
     int counter[i]={0};      
 for (int i=0; i<N; i++){
   for (int j=0; j<N; j++){
     if (S[i]==S[j]) counter[i]++}
 }
           int maxcount=0;
  for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
           string B[3*100000];
  for (int i=0; i<N; i++){
    if (maxcount==counter[i]){
      B.push(S[i]);}}
          sort(B,B+3*100000);
           for (int i=0; i<N; i++){
             cout<<B[i]<<endl;}}
           
           
              

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: 'i' was not declared in this scope
    9 |      int counter[i]={0};
      |                  ^
a.cc:12:22: error: 'counter' was not declared in this scope
   12 |      if (S[i]==S[j]) counter[i]++}
      |                      ^~~~~~~
a.cc:15:49: error: 'counter' was not declared in this scope
   15 |   for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
      |                                                 ^~~~~~~
a.cc:18:19: error: 'counter' was not declared in this scope
   18 |     if (maxcount==counter[i]){
      |                   ^~~~~~~
a.cc:19:9: error: request for member 'push' in 'B', which is of non-class type 'std::string [300000]' {aka 'std::__cxx11::basic_string<char> [300000]'}
   19 |       B.push(S[i]);}}
      |         ^~~~
a.cc:20:11: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |           sort(B,B+3*100000);
      |           ^~~~
      |           short
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int N;
  cin>>N;
  string S[3*100000};
           for ( int i=0; i<N; i++) cin>>S[i];
     int counter[i]={0};      
 for (int i=0; i<N; i++){
   for (int j=0; j<N; j++){
     if (S[i]==S[j]) counter[i]++}
 }
           int maxcount=0;
  for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
           string B[3*100000];
  for (int i=0; i<N; i++){
    if (maxcount==counter[i]){
      B.push(S[i]);}}
          sort(B,B+3*100000);
           for (int i=0; i<N; i++){
             cout<<B[i]<<endl;}}
           
           
              

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected ']' before '}' token
    7 |   string S[3*100000};
      |                    ^
      |                    ]
a.cc: At global scope:
a.cc:8:12: error: expected unqualified-id before 'for'
    8 |            for ( int i=0; i<N; i++) cin>>S[i];
      |            ^~~
a.cc:8:27: error: 'i' does not name a type
    8 |            for ( int i=0; i<N; i++) cin>>S[i];
      |                           ^
a.cc:8:32: error: 'i' does not name a type
    8 |            for ( int i=0; i<N; i++) cin>>S[i];
      |                                ^
a.cc:9:18: error: 'i' was not declared in this scope
    9 |      int counter[i]={0};
      |                  ^
a.cc:10:2: error: expected unqualified-id before 'for'
   10 |  for (int i=0; i<N; i++){
      |  ^~~
a.cc:10:16: error: 'i' does not name a type
   10 |  for (int i=0; i<N; i++){
      |                ^
a.cc:10:21: error: 'i' does not name a type
   10 |  for (int i=0; i<N; i++){
      |                     ^
a.cc:15:3: error: expected unqualified-id before 'for'
   15 |   for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
      |   ^~~
a.cc:15:17: error: 'i' does not name a type
   15 |   for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
      |                 ^
a.cc:15:22: error: 'i' does not name a type
   15 |   for (int i=0; i<N; i++) maxcount=max(maxcount,counter[i]);
      |                      ^
a.cc:17:3: error: expected unqualified-id before 'for'
   17 |   for (int i=0; i<N; i++){
      |   ^~~
a.cc:17:17: error: 'i' does not name a type
   17 |   for (int i=0; i<N; i++){
      |                 ^
a.cc:17:22: error: 'i' does not name a type
   17 |   for (int i=0; i<N; i++){
      |                      ^
a.cc:20:15: error: expected constructor, destructor, or type conversion before '(' token
   20 |           sort(B,B+3*100000);
      |               ^
a.cc:21:12: error: expected unqualified-id before 'for'
   21 |            for (int i=0; i<N; i++){
      |            ^~~
a.cc:21:26: error: 'i' does not name a type
   21 |            for (int i=0; i<N; i++){
      |                          ^
a.cc:21:31: error: 'i' does not name a type
   21 |            for (int i=0; i<N; i++){
      |                               ^
a.cc:22:32: error: expected declaration before '}' token
   22 |              cout<<B[i]<<endl;}}
      |                                ^
Language: C++

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

int main(){
 int n;
 cin >> n;
 map<string, int> mp;
 for (int i=0;i<n;i++){
   string s;
   cin >> s;
   mp[s]++;
 }
  
 int mx=0;
 for (auto p:mp) mx=max(mx, p.second);
 for (auto p:mp){
   if (p.second!=mx) continue;
   cout << p.first << endl;
 }
}


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before numeric constant
    3 | using 11=Long Long;
      |       ^~
Language: C++

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

int main(){
 int n;
 cin >> n;
 map<string, int> mp;
 for (int i=0;i<n;i++){
   string s;
   cin >> s;
   mp[s]++;
 }
  
 int mx=0;
 for (auto p:mp) mx=max(mx, p.second);
 for (auto p:mp){
   if (p.second!=mx) continue;
   cout << p.first << endl;
 }
}


Compiler output:
a.cc:3:10: error: 'Long' does not name a type; did you mean 'long'?
    3 | using ll=Long Long;
      |          ^~~~
      |          long
Language: C++

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

int main(){
 int n;
 cin >> n;
 map<string, int> mp;
 for (int i=0;i<n;i++){
   string s;
   cin >> s;
   mp[s]++;
 }
  
 int mx=0;
 for (auto p:mp) mx=max(mx, p.second);
 for (auto p:mp){
   if (p.second!=mx) continue;
   cout << p.first << endl;
 }

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

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

int main() {
  int N;
  cin >> N;
  string s;
  map<string, int> mp;
  REP(i,N) {
    cin >> s;
    mp[s]++;
  }
  int mx = 0;
  for (auto itr : mp) {
    chmax(mx, itr.second);
  }
  for (auto itr :mp) {
    cout << itr.first << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   REP(i,N) {
      |       ^
a.cc:10:3: error: 'REP' was not declared in this scope
   10 |   REP(i,N) {
      |   ^~~
a.cc:16:5: error: 'chmax' was not declared in this scope
   16 |     chmax(mx, itr.second);
      |     ^~~~~
Language: C++

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

int main() {
  map<string,int> m;
  int n;
  cin >> n;
  for(int i=0; i<n;i++){
    string s;
    cin >> s;
    m[s]++;
    }
  int ma=-1;
  for(auto q: m){
    ma = max(ma, q.second);
    }
  for(auto q: m) {
    if(q.second==ma)
      cout << q.first << "\n";
    }
  }
return 0;
  
}

Compiler output:
a.cc:22:1: error: expected unqualified-id before 'return'
   22 | return 0;
      | ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

int main() {
  int N;
  vector<string>S, ANS;
  cin >> N;
  for (int i = 0; i < N; i++) {
    string x;
    cin >> x;
    S.push_back(x);
  }

  sort(S.begin(), S.end());

  int sum = 1;
  int maxv = 0;
  for (int i = 0; i < N-1; i++) {
    if (S[i] == S.at(i+1)) {
      sum++;
    } else {
      sum = 1;
    }

    if (maxv < sum) {
      ANS.clear();
      ANS.push_back(S[i]);
      maxv = sum;
    } else if (maxv == sum) {
      ANS.push_back(S[i]);
    }

    if (i == N-2 && sum == 1) {
      ANS.push_back(S[i+1]);
    }
  }

  for (int i = 0; i < ANS.size(); i++) {
    cout << ANS[i] << endl;
  }


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

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}

int main(){
    ll n,mx=0;
    cin>>n;
    map<string,ll> mp;
    string s;
    rep(i,n){
        cin>>s;
        mp[s]++;
        mx=max(mx,mp[s]);
    } 
    for(auto x:mp){
        if(x.second==mx) cout<<mp.first<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:35: error: 'class std::map<std::__cxx11::basic_string<char>, long long int>' has no member named 'first'
   20 |         if(x.second==mx) cout<<mp.first<<endl;
      |                                   ^~~~~
Language: C++

from collections import Counter, deque
n = int(input())
S = [input() for _ in range(n)]

dictionary = dict(Counter(S))
ans = [""] * n
i = 0
for k in dictionary.keys():
    if dictionary[k] == max(list(dictionary.values())):
        ans[i] = k
        i += 1

ans.sort()
for a in ans:
    if a == "":
        continue
    print(a)

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n;
  cin>>n;
  map<string,int>dic;
  string s;
  rep(i,n){
    cin>>s;
    dic[s]++;
  }
  int cnt=0;
  for(auto m:dic){
    if(p<m.second)p=m.second;
  }
  for(auto m:dic){
    if(p==m.second)
      cout<<m.first<<endl;
  } 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: 'p' was not declared in this scope
   19 |     if(p<m.second)p=m.second;
      |        ^
a.cc:22:8: error: 'p' was not declared in this scope
   22 |     if(p==m.second)
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n;
  cin>>n;
  map<string,int>dic;
  string s;
  rep(i,n){
    cin>>s;
    dic[s]++;
  }
  int cnt=0;
  for(m:dic){
    if(p<m.second)p=m.second;
  }
  for(m:dic){
    if(p==m.second)
      cout<<m.first<<endl;
  } 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: found ':' in nested-name-specifier, expected '::'
   18 |   for(m:dic){
      |        ^
      |        ::
a.cc:18:7: error: 'm' has not been declared
   18 |   for(m:dic){
      |       ^
a.cc:21:3: error: expected primary-expression before 'for'
   21 |   for(m:dic){
      |   ^~~
a.cc:20:4: error: expected ';' before 'for'
   20 |   }
      |    ^
      |    ;
   21 |   for(m:dic){
      |   ~~~
a.cc:21:3: error: expected primary-expression before 'for'
   21 |   for(m:dic){
      |   ^~~
a.cc:20:4: error: expected ')' before 'for'
   20 |   }
      |    ^
      |    )
   21 |   for(m:dic){
      |   ~~~
a.cc:18:6: note: to match this '('
   18 |   for(m:dic){
      |      ^
a.cc:21:8: error: found ':' in nested-name-specifier, expected '::'
   21 |   for(m:dic){
      |        ^
      |        ::
a.cc:21:7: error: 'm' has not been declared
   21 |   for(m:dic){
      |       ^
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc:24:4: error: expected ';' before '}' token
   24 |   }
      |    ^
      |    ;
   25 | }
      | ~   
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc:24:4: error: expected ')' before '}' token
   24 |   }
      |    ^
      |    )
   25 | }
      | ~   
a.cc:21:6: note: to match this '('
   21 |   for(m:dic){
      |      ^
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n;
  cin>>n;
  map<string,int>dic;
  rep(i,n){
    cin>>s;
    dic[s]++;
  }
  int cnt=0;
  for(m:dic){
    if(p<m.second)p=m.second;
  }
  for(m:dic){
    if(p==m.second)
      cout<<m.first<<endl;
  } 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 's' was not declared in this scope
   13 |     cin>>s;
      |          ^
a.cc:17:8: error: found ':' in nested-name-specifier, expected '::'
   17 |   for(m:dic){
      |        ^
      |        ::
a.cc:17:7: error: 'm' has not been declared
   17 |   for(m:dic){
      |       ^
a.cc:20:3: error: expected primary-expression before 'for'
   20 |   for(m:dic){
      |   ^~~
a.cc:19:4: error: expected ';' before 'for'
   19 |   }
      |    ^
      |    ;
   20 |   for(m:dic){
      |   ~~~
a.cc:20:3: error: expected primary-expression before 'for'
   20 |   for(m:dic){
      |   ^~~
a.cc:19:4: error: expected ')' before 'for'
   19 |   }
      |    ^
      |    )
   20 |   for(m:dic){
      |   ~~~
a.cc:17:6: note: to match this '('
   17 |   for(m:dic){
      |      ^
a.cc:20:8: error: found ':' in nested-name-specifier, expected '::'
   20 |   for(m:dic){
      |        ^
      |        ::
a.cc:20:7: error: 'm' has not been declared
   20 |   for(m:dic){
      |       ^
a.cc:24:1: error: expected primary-expression before '}' token
   24 | }
      | ^
a.cc:23:4: error: expected ';' before '}' token
   23 |   }
      |    ^
      |    ;
   24 | }
      | ~   
a.cc:24:1: error: expected primary-expression before '}' token
   24 | }
      | ^
a.cc:23:4: error: expected ')' before '}' token
   23 |   }
      |    ^
      |    )
   24 | }
      | ~   
a.cc:20:6: note: to match this '('
   20 |   for(m:dic){
      |      ^
a.cc:24:1: error: expected primary-expression before '}' token
   24 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n;
  cin>>n;
  vector<string>s(n);
  rep(i,n) cin>>s[i];
  map<string,int>dic;
  int cnt=0;
  rep(i,n)
    dic[s[i]]++;
  rep(mp:dic){
    cnt=max(cnt,mp.second);
  }
  rep(mp:dic){
    if(cnt==mp.second)
      cout<<mp.first<<endl;
  } 
}

Compiler output:
a.cc:17:13: error: macro "rep" requires 2 arguments, but only 1 given
   17 |   rep(mp:dic){
      |             ^
a.cc:3:9: note: macro "rep" defined here
    3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |         ^~~
a.cc:20:13: error: macro "rep" requires 2 arguments, but only 1 given
   20 |   rep(mp:dic){
      |             ^
a.cc:3:9: note: macro "rep" defined here
    3 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:17:3: error: 'rep' was not declared in this scope
   17 |   rep(mp:dic){
      |   ^~~
a.cc:20:6: error: expected ';' before '{' token
   20 |   rep(mp:dic){
      |      ^       ~
      |      ;
Language: Java

import java.util.*; 
import java.io.*; 

public class Main {
	public static void main(String[] args) throws IOException {
       InputReader in = new InputReader(System.in);
       int n = in.readInt(); 
       HashMap<String ,Integer> map = new HashMap<>(); 
       
       for(int i =0; i<n; i++) {
    	   String s = in.readString();
    	   if(map.containsKey(s)) {
    		    map.put(s, map.get(s) + 1);
    	   }
    	   else  map.put(s, 1);
       }
        
       HashSet<String> votes = new HashSet<>(); 
       
       int max = Integer.MIN_VALUE; 
       for(Map.Entry<String, Integer> entry: map.entrySet()) {
    	   if(max <= entry.getValue()) {
    		   max = entry.getValue();
    	   }
       }
       for(Map.Entry<String , Integer> entry: map.entrySet()) {
    	   if(entry.getValue() == max) {
    		   votes.add(entry.getKey()); 
    	   }
       }
    	 ArrayList<String> list = new ArrayList<>(votes); 
       Collections.sort(list);
       for(String i : list) {
    	   System.out.println(i); 
       }
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
       InputReader in = new InputReader(System.in);
       ^
  symbol:   class InputReader
  location: class Main
Main.java:6: error: cannot find symbol
       InputReader in = new InputReader(System.in);
                            ^
  symbol:   class InputReader
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n;
  cin>>n;
  string s;
  map<string,int>dic;
  rep(i,n) {cin>>s;
            dic[s]++;}
  int p=0;
  for(auto m:dic) p=max(p,m.second)
  for(auto m:dic){
    if(p==m.second)
      cout<<m.first<<endl;
  }
}
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:36: error: expected ';' before 'for'
   16 |   for(auto m:dic) p=max(p,m.second)
      |                                    ^
      |                                    ;
   17 |   for(auto m:dic){
      |   ~~~                               
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
int main()	{
  int n;
  cin>>n;
  string s;
  map<string,int>dic;
  rep(i,n) {cin>>s[i];
            dic[s[i]]++;}
  int p=0;
  for(auto m:dic) p=max(p,m.second)
  for(auto m:dic){
    if(p==m.second)
      cout<<m.first<<endl;
  }
}
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   14 |             dic[s[i]]++;}
      |                ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:16:36: error: expected ';' before 'for'
   16 |   for(auto m:dic) p=max(p,m.second)
      |                                    ^
      |                                    ;
   17 |   for(auto m:dic){
      |   ~~~                               
a.cc: At global scope:
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;#
  map<string,int> mp;
  for(int i=0;i<N;i++){
    string s;
    cin>>s;
    mp[s]++;
  }
  int mx=0;
  for(auto x:mp){
    mx=max(mx,x.second);
  }
  for(auto t:mp){
    if(mx==t.second){
      cout<<t.first<<endl;
    }
  }
  return 0;
}
      

Compiler output:
a.cc:5:10: error: stray '#' in program
    5 |   cin>>N;#
      |          ^
Language: C++

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

int main() {
 int n;
 cin >> n;
 string s[n];
 rep(i,n) cin >> s[i];

 map<string,int> ans;

 rep(i,n){
   string ss =s[i]; 
   ans[ss] +=1;
 }

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

 for(auto p:ans){
   if(p.second==maxv){
     cout << p.first << endl;
   }
 }

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

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); ++i)
using namespace std;
int main()
{
	int N;
	cin >>N;
	map<string, int> mp;
	rep(i, n){
		string s;
		cin >>s;
		mp[s]++;
	}
	int mx = 0;
	for(auto p : mp){
		mx = max(mx, p.second);
	}
	for(auto p: mp){
		if(p.second != mx){
			continue;
		}
		cout <<p.first <<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'n' was not declared in this scope
    9 |         rep(i, n){
      |                ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<(n); ++i)
      |                                  ^
Language: Java

import java.util.Scanner;
import java.util.Map;
import java.util.Map.Entry;
import java.util.HashMap;
import java.util.List;
import java.security.KeyStore.Entry;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;

class Main {
    
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<String, Integer> map = new HashMap<>();
        for(int i=0; i<n; i++){
            String str = scanner.next();
            if(map.containsKey(str)){
                map.put(str, map.get(str)+1);
            }else{
                map.put(str, 1);
            }
        }
        scanner.close();
        List<Entry<String, Integer>> list = new ArrayList<>(map.entrySet());
        Collections.sort(list, new Comparator<Entry<String, Integer>>() {
            public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2){
                return obj1.getValue().compareTo(obj2.getValue());
            }
        });
        List<String> resultList = new ArrayList<>();
        // resultList.add(list.get(list.size()-1).getKey());
        for(int i=list.size()-1; i>=0; i--){
            if(list.get(i).getValue()==list.get(list.size()-1).getValue()){
                resultList.add(list.get(i).getKey());
            }
        }
        Collections.sort(resultList);
        for (String string : resultList) {
            System.out.println(string);
        }
    }

    
}

Compiler output:
Main.java:6: error: a type with the same simple name is already defined by the single-type-import of Entry
import java.security.KeyStore.Entry;
^
Main.java:28: error: reference to Entry is ambiguous
        List<Entry<String, Integer>> list = new ArrayList<>(map.entrySet());
             ^
  both interface java.util.Map.Entry in Map and interface java.security.KeyStore.Entry in KeyStore match
Main.java:29: error: reference to Entry is ambiguous
        Collections.sort(list, new Comparator<Entry<String, Integer>>() {
                                              ^
  both interface java.util.Map.Entry in Map and interface java.security.KeyStore.Entry in KeyStore match
Main.java:30: error: reference to Entry is ambiguous
            public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2){
                               ^
  both interface java.util.Map.Entry in Map and interface java.security.KeyStore.Entry in KeyStore match
Main.java:30: error: reference to Entry is ambiguous
            public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2){
                                                            ^
  both interface java.util.Map.Entry in Map and interface java.security.KeyStore.Entry in KeyStore match
5 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class atco160b
{
	static void merge(int arr[], int l, int m, int r) 
    { 
        int n1 = m - l + 1; 
        int n2 = r - m; 
        int L[] = new int [n1]; 
        int R[] = new int [n2]; 
        for (int i=0; i<n1; ++i) 
            L[i] = arr[l + i]; 
        for (int j=0; j<n2; ++j) 
            R[j] = arr[m + 1+ j]; 
        int i = 0, j = 0; 
        int k = l; 
        while (i < n1 && j < n2) 
        { 
            if (L[i] <= R[j]) 
            { 
                arr[k] = L[i]; 
                i++; 
            } 
            else
            { 
                arr[k] = R[j]; 
                j++; 
            } 
            k++; 
        } 
        while (i < n1) 
        { 
            arr[k] = L[i]; 
            i++; 
            k++; 
        } 
        while (j < n2) 
        { 
            arr[k] = R[j]; 
            j++; 
            k++; 
        } 
    } 
    static void sort(int arr[], int l, int r) 
    { 
        if (l < r) 
        { 
            int m = (l+r)/2; 
            sort(arr, l, m); 
            sort(arr , m+1, r); 
            merge(arr, l, m, r); 
        } 
    } 
    static int gcd(int a, int b) 
    { 
      if (b == 0) 
        return a; 
      return gcd(b, a % b);  
    } 
    static long power(long n,long m)
    {
    	if(m==0)
    		return 1;
    	long ans=1;
    	while(m>0)
    	{
    		ans=ans*n;
    		m--;
    	}
    	return ans;
    }
    static int binarySearch(int arr[], int x) 
    { 
        int l = 0, r = arr.length - 1; 
        while (l <= r) { 
            int m = l + (r - l) / 2; 
            if (arr[m] == x) 
                return m; 
            if (arr[m] < x) 
                l = m + 1; 
            else
                r = m - 1; 
        } 
        return -1; 
    } 
	public static void main(String args[])throws Exception
	{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		long n=Long.parseLong(br.readLine());
		HashMap <String,Integer> mp=new HashMap<String,Integer> ();
		ArrayList<String> arrli=new ArrayList<String>();
		int max=0;
	    for(int i=0;i<n;i++)
	    {
	        String s;
	        s=br.readLine();
	        if(!mp.containsKey(s))
	        {
	             mp.put(s,1);
	             continue;
	        }
	        else
	        {
	            int temp=mp.get(s);
	            temp++;
	            mp.put(s,temp);
	            if(temp==max)
	            	arrli.add(s);
	            else
	            {
	            	max=temp;
	            	arrli.clear();
	            	arrli.add(s);
	            }
	        }
	    }
	    Collections.sort(arrli);
	    int t=arrli.size();
	    for(int i=0;i<t;i++)
	    System.out.println(arrli.get(i));
	}
}


Compiler output:
Main.java:4: error: class atco160b is public, should be declared in a file named atco160b.java
public class atco160b
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    int N;
    string S;
    cin>>N;
    map<string,int>mp;
    for(i=0;i<N;i++){
        cin>>S;
        mp[S]+=1;
    }
    int max;
    for(const auto& e : mp){
        int x = e.second;
        if(x>max)max=x;
    }
    for(auto it = mp.begin();it != mp.end();it++){
        if(it->second == max)cout << it->first <<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     for(i=0;i<N;i++){
      |         ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<P> v(n);
  rep(i,n){
    cin >> v.at(i).first;
  }
  sort(v.begin(),v.end());
  rep(i,n){
    for(int j = i+1; j< n;j++){
      if (v.at(i).first == v.at(j).first){
        v.at(i).second++;
      }
      if(v.at(i).first != v.at(j).first){
        i = j+1
        continue;
      }
    }
  }
  int k = 0;
  for(int i = 0; i<n;i++){
    k = max(k,v.at(i).second);
  }
  rep(j,n){
    if(v.at(j).second == k){
      cout << v.at(j).first << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: expected ';' before 'continue'
   20 |         i = j+1
      |                ^
      |                ;
   21 |         continue;
      |         ~~~~~~~~
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    TreeMap<String, Integer> paper = new TreeMap<>();
    int max = 1;
    for(int i=0; i<N; i++){
      String tmp = sc.next();
      if(paper.containsKey(tmp)){
        paper.put(tmp, paper.get(tmp)++);
        max = Math.max(max, paper.get(tmp));
      }else{
        paper.put(tmp, 1);
      }
    }
    for(String key: paper.keySet()){
      if(max == paper.get(key)){
        System.out.println(key);
      }
    }
  }
}
    
        

Compiler output:
Main.java:11: error: unexpected type
        paper.put(tmp, paper.get(tmp)++);
                                ^
  required: variable
  found:    value
1 error
Language: C++

//INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
//DEFINE
//------------------------------------------
#define ll long long
#define ALLv(a)  (a).begin(),(a).end()
#define ALL(a,n)  (a),(a)+n
#define vi vector<long long>
#define vd vector<long double>
#define vs vector<string>
//CONST
//------------------------------------------
#define INF 1010000000000000017LL
#define MOD 1000000007LL
#define EPS 1e-12
#define PI 3.14159265358979323846
//REPEAT
//------------------------------------------
#define   FOR(i,m,n) for(ll (i)=(m);   (i)<(n);  (i)++)
#define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
#define  REPS(i,x)   for(ll (i)=1;     (i)<=(x); (i)++)
#define  RREP(i,x)   for(ll (i)=(x)-1; (i)>=0;   (i)--)
#define RREPS(i,x)   for(ll (i)=(x);   (i)> 0;   (i)--)
#define  WREP(i,in,j,jn) REP(i,in)REP(j,jn)
#define ifYN(x) cout<<(x?"APPROVED":"DENIED")<<"\n"
using namespace std;
//-------------------------------------------

int main(void){
  ll N;cin>>N;
  map<string,ll> mp;
  string s(
  REP(i,N){
    cin>>s;
    mp[s]++;
  }
  for(auto itr = mp.begin(); itr != mp.end(); ++itr) {
    cout<<itr->second<<"\n";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: expected primary-expression before 'for'
   21 | #define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
      |                      ^~~
a.cc:34:3: note: in expansion of macro 'REP'
   34 |   REP(i,N){
      |   ^~~
a.cc:34:7: error: 'i' was not declared in this scope
   34 |   REP(i,N){
      |       ^
a.cc:21:41: note: in definition of macro 'REP'
   21 | #define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
      |                                         ^
Language: C++

//INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
//DEFINE
//------------------------------------------
#define ll long long
#define ALLv(a)  (a).begin(),(a).end()
#define ALL(a,n)  (a),(a)+n
#define vi vector<long long>
#define vd vector<long double>
#define vs vector<string>
//CONST
//------------------------------------------
#define INF 1010000000000000017LL
#define MOD 1000000007LL
#define EPS 1e-12
#define PI 3.14159265358979323846
//REPEAT
//------------------------------------------
#define   FOR(i,m,n) for(ll (i)=(m);   (i)<(n);  (i)++)
#define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
#define  REPS(i,x)   for(ll (i)=1;     (i)<=(x); (i)++)
#define  RREP(i,x)   for(ll (i)=(x)-1; (i)>=0;   (i)--)
#define RREPS(i,x)   for(ll (i)=(x);   (i)> 0;   (i)--)
#define  WREP(i,in,j,jn) REP(i,in)REP(j,jn)
#define ifYN(x) cout<<(x?"APPROVED":"DENIED")<<"\n";
using namespace std;
//-------------------------------------------

int main(void){
  ll N;cin>>N;
  map<string,ll> mp;
  string s(
  REP(i,N){
    cin>>s;
    mp[s]++;
  }
  for(auto itr = mp.begin(); itr != mp.end(); ++itr) {
       cout<<itr->second<<"\n";
    }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:22: error: expected primary-expression before 'for'
   21 | #define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
      |                      ^~~
a.cc:34:3: note: in expansion of macro 'REP'
   34 |   REP(i,N){
      |   ^~~
a.cc:34:7: error: 'i' was not declared in this scope
   34 |   REP(i,N){
      |       ^
a.cc:21:41: note: in definition of macro 'REP'
   21 | #define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
      |                                         ^
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;
  cin >> n;
 
  map<string,int> c;
  rep(i,n){
    string s;
    cin >> s;
    if(c.count(s)){
      c[s]++;
    }else{
      c[s] = 1;
    }
  }
  
  int smax = 0;
  for(anto s : c){
    smax = max(smax,c[s]);
  }
  for(anto s : c){
    if(c[s] == smax) cout << s << end; 
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'anto' was not declared in this scope; did you mean 'auto'?
   22 |   for(anto s : c){
      |       ^~~~
      |       auto
a.cc:25:3: error: expected primary-expression before 'for'
   25 |   for(anto s : c){
      |   ^~~
a.cc:24:4: error: expected ';' before 'for'
   24 |   }
      |    ^
      |    ;
   25 |   for(anto s : c){
      |   ~~~
a.cc:25:3: error: expected primary-expression before 'for'
   25 |   for(anto s : c){
      |   ^~~
a.cc:24:4: error: expected ')' before 'for'
   24 |   }
      |    ^
      |    )
   25 |   for(anto s : c){
      |   ~~~
a.cc:22:6: note: to match this '('
   22 |   for(anto s : c){
      |      ^
a.cc:25:11: error: expected ';' before 's'
   25 |   for(anto s : c){
      |           ^~
      |           ;
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
a.cc:27:4: error: expected ';' before '}' token
   27 |   }
      |    ^
      |    ;
   28 | }
      | ~   
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
a.cc:27:4: error: expected ')' before '}' token
   27 |   }
      |    ^
      |    )
   28 | }
      | ~   
a.cc:25:6: note: to match this '('
   25 |   for(anto s : c){
      |      ^
a.cc:28:1: error: expected primary-expression before '}' token
   28 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


int main() {
int n;
cin >> n;
string s;
map<string,int> m;
REP(i,n) {
  cin >> s;
  m[s]++;
}
vector<pair<int,string>> v;
for(auto && a:m) {
  v.push_back(a.second*-1,a.first);
}
sort(ALL(v));
int ans = v[0].first;
REP(i,v.size()) {
  if(v[i].first==ans) {
    cout << v[i].second << endl;
  }
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: no matching function for call to 'std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::push_back(int, const std::__cxx11::basic_string<char>&)'
   23 |   v.push_back(a.second*-1,a.first);
      |   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<int, std::__cxx11::basic_string<char> > >; value_type = std::pair<int, std::__cxx11::basic_string<char> >]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<int, std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<int, std::__cxx11::basic_string<char> > >; value_type = std::pair<int, std::__cxx11::basic_string<char> >]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note:   candidate expects 1 argument, 2 provided
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector <string> s(n);
  for(int i=0;i<n;i++){
    cin >> s.at(i);
  }
  
  int max=0;
  vector <string> max_string;
  for(int i=0; i<n; i++){
    int counter=0;
    for(int j=i;j<n;j++){
      if(s.at(j).compare(s.at(i))==0)
        counter++;
    }
    if(counter>max){
      max_string={s.at(i)};
      max=counter;
    }
    if(counter==max)
      max_string.push_back(s.at(i));
  }
  
  sort(max_string.begin(),max_string.end());
  
  for(int i=0;i<max_string.size();i++)
    cout << max_string(i) << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:23: error: no match for call to '(std::vector<std::__cxx11::basic_string<char> >) (int&)'
   32 |     cout << max_string(i) << endl;
      |             ~~~~~~~~~~^~~