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

  string s, r, y;
  cin>>n;
  vector<string>v;
  map<string,int>hash;
  rep(i,0,n) {cin>>s;hash[s]++;}
  for(auto x:hash)
  {
    if(x.ss>k)k=x.ss;
  }
  for(auto it=hash.begin();it!=hash.end();it++)
  {
    if(it->ss==k) cout<<it->ff<<endl;
  }
  /*rep(i,0,v.size()) hash[v[i]]++;
  int max_count = 0, res = -1; 

    for (auto i : hash) { 

        if (max_count < i.second) { 

            //res = i.first; 

            max_count = i.second; 

        } 

    }
    vector<string>vec;
    for (auto i : hash) { 

        if (max_count == i.second) { */
/*r=i.first;
sort(r.begin(),r. end());
            cout<<r<<endl;*/
            /*  vec. pb(i.first);

            max_count = i.second; 

        } }
        rep(i,0,vec.size()) cout<<vec[i]<<endl;*/
    
  /*sort(all(v));
  rep(i,0,v.size())
  {
    if(v[i]==v[i+1] && i+1<v.size()) {k++;continue;}
    if(k>m) {m=k;k=0;}
  }
  k=0;
  rep(i,0,v.size())
  {
    if(v[i]==v[i+1] && i+1<v.size()) {k++;continue;}
    if(k==m) {sort(v[i].begin(),v[i].end());cout<<v[i]<<endl;}
    k=0;
  }*/
  
  /*sort(r.begin(),r. end());
  cout<<r;*/
}
int main()
{
 ios_base::sync_with_stdio(false);
  cin. tie(0);cout. tie(0);
    ll t=1;
   //cin>>t;
    while(t--)
    {
      solve();
    }
    return 0;
}

Compiler output:
a.cc:1:3: error: 'string' does not name a type
    1 |   string s, r, y;
      |   ^~~~~~
a.cc:2:3: error: 'cin' does not name a type
    2 |   cin>>n;
      |   ^~~
a.cc:3:3: error: 'vector' does not name a type
    3 |   vector<string>v;
      |   ^~~~~~
a.cc:4:3: error: 'map' does not name a type
    4 |   map<string,int>hash;
      |   ^~~
a.cc:5:6: error: expected constructor, destructor, or type conversion before '(' token
    5 |   rep(i,0,n) {cin>>s;hash[s]++;}
      |      ^
a.cc:6:3: error: expected unqualified-id before 'for'
    6 |   for(auto x:hash)
      |   ^~~
a.cc:10:3: error: expected unqualified-id before 'for'
   10 |   for(auto it=hash.begin();it!=hash.end();it++)
      |   ^~~
a.cc:10:28: error: 'it' does not name a type; did you mean 'int'?
   10 |   for(auto it=hash.begin();it!=hash.end();it++)
      |                            ^~
      |                            int
a.cc:10:43: error: 'it' does not name a type; did you mean 'int'?
   10 |   for(auto it=hash.begin();it!=hash.end();it++)
      |                                           ^~
      |                                           int
a.cc:58:1: error: expected declaration before '}' token
   58 | }
      | ^
a.cc: In function 'int main()':
a.cc:61:2: error: 'ios_base' has not been declared
   61 |  ios_base::sync_with_stdio(false);
      |  ^~~~~~~~
a.cc:62:3: error: 'cin' was not declared in this scope
   62 |   cin. tie(0);cout. tie(0);
      |   ^~~
a.cc:62:15: error: 'cout' was not declared in this scope
   62 |   cin. tie(0);cout. tie(0);
      |               ^~~~
a.cc:63:5: error: 'll' was not declared in this scope
   63 |     ll t=1;
      |     ^~
a.cc:65:11: error: 't' was not declared in this scope
   65 |     while(t--)
      |           ^
a.cc:67:7: error: 'solve' was not declared in this scope
   67 |       solve();
      |       ^~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll int>
#define vs vector<string>
#define v vector<int>
#define mi map<int,int>
#define mc map<char,int>

//ios_base::sync_with_stdio(false);cin.tie(NULL);

using namespace std;

int main(){
     ios_base::sync_with_stdio(false);cin.tie(NULL);
     int n,m=1;
     cin>>n;
     vs A(n);
     vs B;
     for(auto &x:A)cin>>x;
     map<string,int> map1;
     for(auto x:A)map1[x]++;
     //for(auto x:map1)cout<<x.first <<" " <<x.second <<"\n";
     for(auto x:map1){
		 m=max(m,x.second);
	 }
	 for(auto x:map1)
	 if(x.second==m){
		 B.push_back(x.first);}
		 else{continue;}
		 for(auto x:B)cout<<x <<"\n";
}
v

Compiler output:
a.cc:5:21: error: expected unqualified-id at end of input
    5 | #define v vector<int>
      |                     ^
a.cc:32:1: note: in expansion of macro 'v'
   32 | v
      | ^
Language: C++

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

int main(){
  int N; cin>>N;
  vector<string> s(N);
  for(int i=0; i<N; i++) cin>>s[i];
  
  sort(s.begin(), s.end());
  
  int m=1,maxs=0;
  string t;
  t=s[0];
  
  for(int i=0; i<N-1; i++){
    if(t==s[i+1]){
      m++;
    }else{
      t=s[i+1];
      m=1;
    }
    maxs = max(maxs,m);
  }
//  cerr << maxs << endl;
  
  int ct=0;
  t=s[0];
  for(int i=0; i<N; i++){
    if(t==s[i]){
      ct++;
    }else{
      t=s[i];
      ct=1;
    }
    if(ct==maxs){
      cout << s[i] << endl;
    }else if(maxs==1){
      cout << s[i] << endl;
  }
  
}


          

  
     

        
          
  
          

  

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

#include<bits/stdc++.h>
using namespace std;
int main(void){
  int n;
  string s;
  cin>>n;
  map<string,int> mp;
  int m=0;
  while(n--){
    cin>>s;
    if(mp.find(s)==mp.end()){
      mp[s]=1;
    }else{
      ++mp[s];
    }
    m=max(m,mp[3]);
  }
  for(auto i:mp){
    if(i.second==m){
      cout<<i.first<<endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and 'int')
   16 |     m=max(m,mp[3]);
      |               ^
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 'int' 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 'int' to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: Java

import java.util.*;
public class Main1 {
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                Map hs = new HashMap();
                int n = sc.nextInt();
                String[] q = new String[n];
                for(int i = 0 ; i < n ; i++){
                        q[i] = sc.next();
                }
                for(String s : q){
                        int c = 0;
                        if(hs.containsKey(s)) c = (int)hs.get(s);
                        hs.put(s , c + 1);
                }
                int[] qq = {0};
                hs.forEach((s , c) -> {
                        qq[0] = Math.max(qq[0] , (int)c);
                });
                hs.forEach((s , cc) -> {
                        if((int)cc == qq[0]) System.out.println(s);
                });
                sc.close();
        }
}

Compiler output:
Main.java:2: error: class Main1 is public, should be declared in a file named Main1.java
public class Main1 {
       ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,k,maxt=-1;
  cin >> n ;
  map<string,int> me;
  for(int i=0;i<n;i++){
    cin >> a;
    me[a]+=1;
  }
  for(const auto x :me){
    int v=x.second;
    if(v>maxt)maxt=x.second;
  }
  for(auto it=me.begin();it!=me.end();it++){
    if(it->second == maxt){
      cout << it->first << endl;
    }
  }
}
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'a' was not declared in this scope
    8 |     cin >> a;
      |            ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
              	else{
                  break;
                }
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	}
}


Compiler output:
Main.java:22: error: variable max might not have been initialized
         max = Math.max(max,count[i]);
                        ^
Main.java:26: error: variable max might not have been initialized
        	if(count[i]==max) System.out.println(s[i]);
        	             ^
2 errors
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int max;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
            }
         max = Math.max(max,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==max) System.out.println(s[i]);
        }
	}
}


Compiler output:
Main.java:19: error: variable max might not have been initialized
         max = Math.max(max,count[i]);
                        ^
Main.java:23: error: variable max might not have been initialized
        	if(count[i]==max) System.out.println(s[i]);
        	             ^
2 errors
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int x;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
            }
         x = Math.max(x,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==x) System.out.println(s[i]);
        }
	}
}


Compiler output:
Main.java:19: error: variable x might not have been initialized
         x = Math.max(x,count[i]);
                      ^
Main.java:23: error: variable x might not have been initialized
        	if(count[i]==x) System.out.println(s[i]);
        	             ^
2 errors
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			a[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int x;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
            }
         x = Math.max(x,count[i]);
         i +=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==x) System.out.println(s[i]);
        }
	}
}


Compiler output:
Main.java:10: error: cannot find symbol
			a[i] = scn.next();
			^
  symbol:   variable a
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			s[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int x;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
            }
         x = Math.max(x,count[i]);
         i +=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i] == max) System.out.println(s[i]);
        }
	}
}


Compiler output:
Main.java:23: error: cannot find symbol
        	if(count[i] == max) System.out.println(s[i]);
        	               ^
  symbol:   variable max
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			a[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int x;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
            }
         x = Math.max(x,count[i]);
         i+=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i]==x) System.out.println(s[i]);
        }
	}
}


Compiler output:
Main.java:10: error: cannot find symbol
			a[i] = scn.next();
			^
  symbol:   variable a
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[n];
		for(int i=0; i<s.length; i++){
			a[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int x;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
            }
         x = Math.max(x,count[i]);
         i +=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i] == max) System.out.println(s[i]);
        }
	}
}


Compiler output:
Main.java:10: error: cannot find symbol
			a[i] = scn.next();
			^
  symbol:   variable a
  location: class Main
Main.java:23: error: cannot find symbol
        	if(count[i] == max) System.out.println(s[i]);
        	               ^
  symbol:   variable max
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String[] s = new String[n];
      	int[] count = new int[];
		for(int i=0; i<s.length; i++){
			a[i] = scn.next();
          	count[i] = 0;
		}
      	Arrays.sort(s);
      	int x;
      	for(int i=0; i<s.length; i++){
        	for(int j=i+1; j<n; j++){
            	if(s[i].equals(s[j])) count[i]++;
            }
         x = Math.max(x,count[i]);
         i +=count[i];
        }
      	for(int i=0; i<s.length; i++){
        	if(count[i] == max) System.out.println(s[i]);
        }
	}
}

Compiler output:
Main.java:8: error: array dimension missing
      	int[] count = new int[];
      	                       ^
1 error
Language: C++

import java.util.Arrays;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;

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

        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0; i < n; i++) {
            s[i] = sc.next();
        }

        var es = Arrays.stream(s).collect(Collectors.groupingBy(key -> key, Collectors.counting())).entrySet();
        long max = es.stream().max(Map.Entry.comparingByValue()).get().getValue();
        es.stream()
                .filter(e -> e.getValue() == max)
                .sorted(Map.Entry.comparingByKey())
                .forEach(e -> System.out.println(e.getKey()));
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Map;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Scanner;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.stream.Collectors;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;

int main(){
  int n;
  vector<string> sub;
  map<string, int> s;
  cin >> n;
  for(int i = 0; i < n; i++) {
    string tmp;
    cin >> tmp;
    sub.push_back(tmp);

    auto itr = s.find(tmp);
    if(itr != s.end()) {
      itr->second += 1;
    } else {
      s.insert(make_pair(tmp, 1));
    }
  }

  sort(sub.begin(), sub.end());
  sub.erase(unique(sub.begin(), sub.end()), sub.end());

  int max_str = 0;
  for(string x : sub) {
    auto itr = s.find(x);
    int s_cnt = itr->second;
    max_str = max(max_str, s_cnt);
  }

  for(string x : sub) {
    auto itr = s.find(x);
    int s_cnt = itr->second;
    if(max_str == s_cnt) cout << x << endl;
  }
  return 0;
}
takaa

Compiler output:
a.cc:44:1: error: 'takaa' does not name a type
   44 | takaa
      | ^~~~~
Language: C++

//header{{{
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#include <boost/sort/spreadsort/string_sort.hpp>
  
using namespace std;
using namespace boost::multiprecision;  
using namespace boost::math;

#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define Fixed fixed << setprecision(12)
//#define int int64_t
using pii = pair<int,int>;
constexpr int INF  = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod1 = 1e9+7; 
constexpr int mod2 = 998244353;

template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }

template <class T> using min_heap = priority_queue<T,vector<T>,greater<T> >;
template <class T> using max_heap = priority_queue<T>;
template <class A, class B> using umap = unordered_map<A,B>;
  
inline int square(int a){ return a * a;}
inline int updiv(int a,int b){ return (a + b - 1) / b; }

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

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    cin >> n;

    vector<string> s(n);

    int maxv = 0;
    map<string,int> mp;
    rep(i,n){
        cin >> s[i];
        mp[s[i]]++;
        chmax(maxv,mp[s[i]]);
    }

    boost::sort::spreadsort::string_sort(all(s));
    map<string,bool> flg;

    rep(i,n){
        if(mp[s[i]] == maxv && !flg[s[i]]){
            cout << s[i] << '\n';
            flg[s[i]] = true;
        }
    }


    return 0;
}


Compiler output:
a.cc:4:10: fatal error: boost/sort/spreadsort/string_sort.hpp: No such file or directory
    4 | #include <boost/sort/spreadsort/string_sort.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

#define ll long long
#define fast_in_out  ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

int main()
{
    ast_in_out;
    map <string,int> m;
    map <string,int> :: iterator it;
    multimap <int,string> x;
    multimap <int,string> :: iterator xt;
    set <string> st;
    set <string> :: iterator si;
    int n;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        string s;
        cin >> s;
        it = m.find(s);
        if(it == m.end())
        {
            m.insert(make_pair(s,1));
        }
        else
        {
            m[s]++;
        }
    }
    for(it = m.begin(); it != m.end(); it++)
    {
        x.insert(make_pair(it -> second, it -> first));
    }
    xt = x.end();
    xt--;
    int maxi = xt -> first;
    for(xt = x.begin(); xt != x.end(); xt++)
    {
        if(xt -> first == maxi)
        {
            st.insert(xt -> second);
        }
    }
    for(si = st.begin(); si != st.end(); si++)
    {
        cout << *si << "\n";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'ast_in_out' was not declared in this scope; did you mean 'fast_in_out'?
    9 |     ast_in_out;
      |     ^~~~~~~~~~
      |     fast_in_out
Language: Java

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;

public class Poll {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.nextLine());
		int max = 0;
		Map<String, Integer> map = new TreeMap<>();

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

			String n1 = sc.nextLine();
			int val = map.containsKey(n1) ? map.get(n1) + 1 : 1;
			map.put(n1, val);
			max = Math.max(max, val);

		}

		for (var entry : map.entrySet()) {
			if (entry.getValue() == max) {
				System.out.println(entry.getKey());
			}
		}
	}

}


Compiler output:
Main.java:5: error: class Poll is public, should be declared in a file named Poll.java
public class Poll {
       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.TreeMap;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        TreeMap<String, Integer> map = new TreeMap<>();
        int max = 0;
        for(int i = 0; i < N; i++) {
            String key = sc.next();
            if(map.containsKey(key)) {
                int val = map.get(key);
                map.put(key, ++val);
            } else {
                map.put(key, 1);
            }
            int val = map.get(key);
            max = Math.max(val, max);
        }
        for(Map.Entry<String, Integer> entry : map.entrySet()) {
            int val = entry.getValue();
            String key = entry.getKey();
            if(val == max) System.out.println(key);
        }
    }
}


Compiler output:
Main.java:21: error: package Map does not exist
        for(Map.Entry<String, Integer> entry : map.entrySet()) {
               ^
1 error
Language: C

#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
//#include<bits/stdc++.h>
#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int cm = 1 << 17;
char cn[cm], * ci = cn, ct;
inline char getcha() {
	if (ci - cn == cm) { fread_unlocked(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline ll getint() {
	ll A = 0;
	int k = 10;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= 'a') A = (A << 5) + ct - '`', k--;
	else while ((ct = *ci++) >= 'a') A = (A << 5) + ct - '`', k--;
	A <<= k * 5;
	return A;
}

char D[2200010];
char *di = D;
void pakuri_sort(int N, ll A[]) {
	const int b = 9;
	ll tmp[200001];
	rep(k, 6) {
		int kazu[1 << b] = {}, kazu2[1 << b] = {};
		rep(i, N) kazu[A[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu[i + 1] += kazu[i];
		for (int i = N - 1; i >= 0; i--) tmp[--kazu[A[i] >> k * b & ((1 << b) - 1)]] = A[i];
		k++;
		rep(i, N) kazu2[tmp[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu2[i + 1] += kazu2[i];
		for (int i = N - 1; i >= 0; i--) A[--kazu2[tmp[i] >> k * b & ((1 << b) - 1)]] = tmp[i];
	}
}

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	fread_unlocked(cn, 1, cm, stdin);
	int N = 0;
	while ((ct = *ci++) >= '0') N = N * 10 + ct - '0';

	ll S[200000];
	rep(i, N) S[i] = getint();
	pakuri_sort(N, S);
	int kazu = 0;
	int saidai = 1;
	ll mae = 0;
	rep(i, N) {
		if (S[i] != mae) {
			if (saidai < kazu) {
				saidai = kazu;
				di = D;
			}
			if (saidai == kazu) {
				ll s = S[i - 1];
				for (ll m = 45; s; s &= ~(31ll << m), m -= 5) {
					*di++ = (s >> m) + '`';
				}
				*di++ = '\n';
			}
			kazu = 1;
			mae = S[i];
		}
		else kazu++;
	}
	if (saidai < kazu) {
		saidai = kazu;
		di = D;
	}
	if (saidai == kazu) {
		ll s = S[N - 1];
		for (ll m = 45; s; s &= ~(31ll << m), m -= 5) {
			*di++ = (s >> m) + '`';
		}
		*di++ = '\n';
	}
    printf("test\n");
	fwrite(D, 1, di - D, stdout);

	Would you please return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long 
#define mp make_pair
#define pb push_back
#define gcd(a, b)   __gcd(a, b)
#define lcm(a, b)  ((a)*((b)/gcd(a,b)))
#define pi 3.14159265358979323846
#define reus ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
int32_t main()
{
	reus;

//	#ifndef ONLINE_JUDGE
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
//	#endif
    
    int n;
    cin>>n;
    map<string,int>mp;
    set<string>sts;
    string s;
    for(int i=0;i<n;i++)
    {
    	cin>>s;
    	mp[s]++;
	}
	int maxi=INT_MIN;
    for(auto i=mp.begin();i!=mp.end();i++)
    {
    	maxi=max(maxi,i->second);
	}
	for(auto i=mp.begin();i!=mp.end();i++)
	{
		if(i->second==maxi)
		{
			sts.insert(i->first);
		}
	}
	for(auto it=sts.begin();it!=sts.end();it++)
	{
		cout<<*i<<endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:44:24: error: 'i' was not declared in this scope; did you mean 'it'?
   44 |                 cout<<*i<<endl;
      |                        ^
      |                        it
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
		HashMap<String, Integer> map = new HashMap<String, Integer>();
		int max=1;

		for(int i=0; i<N; i++){
			String str = sc.next();
			if(map.containsKey(str)){
				int num = map.get(str);
				map.replace(str, num+1);
				if(max<num+1){
					max = num+1;
				}
			}else{
				map.put(str, 1);
			}
		}
		List<Entry<String, Integer>> list = new ArrayList<Entry<String, Integer>>(map.entrySet());

		Collections.sort(list, new Comparator<Entry<String, Integer>>() {
			public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
				if(obj1.getValue()==obj2.getValue()){
					return obj1.getKey().compareTo(obj2.getKey());
				}else{
					return obj2.getValue().compareTo(obj1.getValue());
				}
			}
		});

		for(Entry<String, Integer> entry : list) {
			if(entry.getValue()==max){
				System.out.println(entry.getKey());
			}
		}
        
    }
}


Compiler output:
Main.java:22: error: cannot find symbol
		List<Entry<String, Integer>> list = new ArrayList<Entry<String, Integer>>(map.entrySet());
		     ^
  symbol:   class Entry
  location: class Main
Main.java:22: error: cannot find symbol
		List<Entry<String, Integer>> list = new ArrayList<Entry<String, Integer>>(map.entrySet());
		                                                  ^
  symbol:   class Entry
  location: class Main
Main.java:24: error: cannot find symbol
		Collections.sort(list, new Comparator<Entry<String, Integer>>() {
		                                      ^
  symbol:   class Entry
  location: class Main
Main.java:25: error: cannot find symbol
			public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
			                   ^
  symbol: class Entry
Main.java:25: error: cannot find symbol
			public int compare(Entry<String, Integer> obj1, Entry<String, Integer> obj2) {
			                                                ^
  symbol: class Entry
Main.java:34: error: cannot find symbol
		for(Entry<String, Integer> entry : list) {
		    ^
  symbol:   class Entry
  location: class Main
6 errors
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        HashMap<String,Integer> hash = new HashMap<>();
        int n =sc.nextInt();
        for (int i=0;i<n;i++){
            String s = sc.next();
            if (hash.containsKey(s)){
                hash.put(s,hash.get(s)+1);
            }else {
                hash.put(s,1);
            }
        }
        int max = Collections.max(hash.values());
        ArrayList<String> st  = new ArrayList<>();
        for (Map.Entry entry : hash.entrySet()){
            if ((int)entry.getValue()==max)st.add((String) entry.getKey());
        }
        Collections.sort(st);
        for (int i=0;i<st.size();i++)System.out.println(st.get(i));
    }

Compiler output:
Main.java:23: error: reached end of file while parsing
    }
     ^
1 error
Language: C

#include <stdio.h>
#include <string.h>
int main(void)
{
  int n,max=0,i,j;
  scanf("%d",&n);
  char str[n][20];
  int strn[n];
  
  for(i=0;i<n;i++){
    scanf("%s",str[i]);
    strn[i]=1;
  }
    for(i=0;i<n;i++){
      for(j=0;j<n;j++){
        if(i!=j&&strcmp(str[i],str[j])==0&&strn[i]!=0&&strn[j]!=0){
          strn[i]+=1;
          strn[j]=0;
        }
      }
      if(strn[i]>max)
        max=strn[i];
    }
  for(i=0;iz,n;i++){
    if(strn[i]==max)
      printf("%s\n",str[i]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:11: error: 'iz' undeclared (first use in this function); did you mean 'i'?
   24 |   for(i=0;iz,n;i++){
      |           ^~
      |           i
main.c:24:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

void main()
{
  int n,i,j,k=0;
  int max=0;
  char *temp;
  scanf("%d",&n);
  char x[n][10];
  int flag[n]={};
  for(i=0;i<n;i++){
  	scanf("%s",x[i]);
  }
  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      if(stcmp(char[i],char[j])>0){
        temp = &char[i];
        char[i] =  &char[j];
        char[j] = temp;
      }
    }
  }
  
  for(i=0;i<n;i++){
  	if(flag[i]==0){
      flag[i]=1;
      for(j=0;j<n;j++){
       	if(flag[j]==0){
          if(strcmp(x[i],x[j])==0){
            flag[i] = flag[i]+1;
            flag[j] = -1;
            if(max < flag[i])
              max = flag[i];
          }
        }
      }
    }
  }
  for(i=0;i<n;i++){
    if(flag[i] == max)
      k++;
  }
  int y[k];
  j=0;
  for(i=0;i<n;i++){
    if(flag[i] == max){
      y[j] = i;
      j++
    }
  }
  for(i=0;i<k;i++){
    for(j=0;j<max;j++)
      printf("%c",char[y[j]]);
  }
  
}

Compiler output:
main.c: In function 'main':
main.c:17:10: error: implicit declaration of function 'stcmp'; did you mean 'strcmp'? [-Wimplicit-function-declaration]
   17 |       if(stcmp(char[i],char[j])>0){
      |          ^~~~~
      |          strcmp
main.c:17:16: error: expected expression before 'char'
   17 |       if(stcmp(char[i],char[j])>0){
      |                ^~~~
main.c:18:17: error: expected expression before 'char'
   18 |         temp = &char[i];
      |                 ^~~~
main.c:19:13: error: expected identifier or '(' before '[' token
   19 |         char[i] =  &char[j];
      |             ^
main.c:20:13: error: expected identifier or '(' before '[' token
   20 |         char[j] = temp;
      |             ^
main.c:49:10: error: expected ';' before '}' token
   49 |       j++
      |          ^
      |          ;
   50 |     }
      |     ~     
main.c:54:19: error: expected expression before 'char'
   54 |       printf("%c",char[y[j]]);
      |                   ^~~~
Language: C

#include <stdio.h>
 
int main(void)
{
  int n,max=0;
  scanf("%d",&n);
  char str[n];
  int strn[n];
  
  for(int i=0;i<n;i++){
    scanf("%s",str);
    strn[i]=1;
    for(int j=1;j<n;j++){
      if(str[i]==str[j])
        strn[i]+=1;
    }
    if(strn[i]>max)
      strn[i]=max;
  }
  }
  for(int i=n-1;i>=0;i--){
    if(strn[i]==max)
      printf("%s",str[i]);
  }
  return 0;
}

Compiler output:
main.c:21:3: error: expected identifier or '(' before 'for'
   21 |   for(int i=n-1;i>=0;i--){
      |   ^~~
main.c:21:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '>=' token
   21 |   for(int i=n-1;i>=0;i--){
      |                  ^~
main.c:21:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '--' token
   21 |   for(int i=n-1;i>=0;i--){
      |                       ^~
main.c:25:3: error: expected identifier or '(' before 'return'
   25 |   return 0;
      |   ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
Language: C++

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

typedef long long ll;

int main(void)
{
    //freopen("input.txt", "r", stdin);

    int i, n;
    cin >> n;
    string a;
    map <string, int> m;
    vector <string> v;

//    int cnt = 1;
    for(i = 0; i < n; i++)
    {
        cin >> a;

        auto it = m.find(a);
        if(it != m.end())
        {
            m[a]++;
            if(m[a] > cnt)
                cnt = m[a];
        }
        else
        {
            m.insert(make_pair(a, 1));
cnt = 1;
        }
    }

    for(auto it = m.begin(); it != m.end(); it++)
    {
        if(it->second == cnt)
            cout << it->first << "\n";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: 'cnt' was not declared in this scope; did you mean 'int'?
   25 |             if(m[a] > cnt)
      |                       ^~~
      |                       int
a.cc:31:1: error: 'cnt' was not declared in this scope; did you mean 'int'?
   31 | cnt = 1;
      | ^~~
      | int
a.cc:37:26: error: 'cnt' was not declared in this scope; did you mean 'int'?
   37 |         if(it->second == cnt)
      |                          ^~~
      |                          int
Language: C++

#include <bits/stdc++.h>
    using namespace std;
     
    typedef long long ll;
     
    int main(void)
    {
        //freopen("input.txt", "r", stdin);
     
        int i, n;
        cin >> n;
        string a;
        map <string, int> m;
        vector <string> v;
     
        int cnt = 0;
        for(i = 0; i < n; i++)
        {
            cin >> a;
     
            auto it = m.find(a);
            if(it != m.end())
            {
                m[a]++;
                if(m[a] >=cnt)
                    {cnt = m[a];}
            }
            else
            {
                mp[a]++;
cnt = 1;
            }
        }
     
        for(auto it = m.begin(); it != m.end(); it++)
        {
            if(it->second == cnt)
                cout << it->first << "\n";
        }
     
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'mp' was not declared in this scope; did you mean 'm'?
   30 |                 mp[a]++;
      |                 ^~
      |                 m
Language: C++

 #include <bits/stdc++.h>
    using namespace std;
     
    typedef long long ll;
     
    int main(void)
    {
        //freopen("input.txt", "r", stdin);
     
        int i, n;
        cin >> n;
        string a;
        map <string, int> m;
        vector <string> v;
     
        int cnt = 0;
        for(i = 0; i < n; i++)
        {
            cin >> a;
     
            auto it = m.find(a);
            if(it != m.end())
            {
                m[a]++;
                if(m[a] > cnt)cnt = m[a];
            }
            else
            {
                mp[a]++;
               cnt = 1;
            }
        }
     
        for(auto it = m.begin(); it != m.end(); it++)
        {
            if(it->second == cnt)
                cout << it->first << "\n";
        }
     
        return 0;
    }



Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: 'mp' was not declared in this scope; did you mean 'm'?
   29 |                 mp[a]++;
      |                 ^~
      |                 m
Language: C++

 #include <bits/stdc++.h>
    using namespace std;
     
    typedef long long ll;
     
    int main(void)
    {
        //freopen("input.txt", "r", stdin);
     
        int i, n;
        cin >> n;
        string a;
        map <string, int> m;
        vector <string> v;
     
        int cnt = 0;
        for(i = 0; i < n; i++)
        {
            cin >> a;
     
            auto it = m.find(a);
            if(it != m.end())
            {
                m[a]++;
                if(m[a] > cnt)
                    cnt = m[a];
            }
            else
            {
                mp[a]++;
//cnt = 1;
            }
        }
     
        for(auto it = m.begin(); it != m.end(); it++)
        {
            if(it->second == cnt)
                cout << it->first << "\n";
        }
     
        return 0;
    }



Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'mp' was not declared in this scope; did you mean 'm'?
   30 |                 mp[a]++;
      |                 ^~
      |                 m
Language: C++

 #include <bits/stdc++.h>
    using namespace std;
     
    typedef long long ll;
     
    int main(void)
    {
        //freopen("input.txt", "r", stdin);
     
        int i, n;
        cin >> n;
        string a;
        map <string, int> m;
        vector <string> v;
     
        int cnt = 0;
        for(i = 0; i < n; i++)
        {
            cin >> a;
     
            auto it = m.find(a);
            if(it != m.end())
            {
                m[a]++;
                if(m[a] > cnt)
                    cnt = m[a];
            }
            else
            {
                mp[a]++;
cnt = 1;
            }
        }
     
        for(auto it = m.begin(); it != m.end(); it++)
        {
            if(it->second == cnt)
                cout << it->first << "\n";
        }
     
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'mp' was not declared in this scope; did you mean 'm'?
   30 |                 mp[a]++;
      |                 ^~
      |                 m
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		Map<String, Integer> map = new HashMap<>();

		int max = 0;
		for (int i = 0; i < N; i++) {
			String S = sc.next();

			if (map.containsKey(S)) {
				map.put(S, map.get(S) + 1);
			} else {
				map.put(S, 1);
			}
			max = Math.max(max, map.get(S));
		}
		List<String> list = new ArrayList<String>();
		for (Map.Entry<String, Integer> key : map.entrySet()) {
			if (key.getValue() == max) {
				list.add(key.getKey());
			}
		}
		Collections.sort(list);
		for (String S : list) {
			System.out.println(S);
		}
      ｝
  ｝

Compiler output:
Main.java:40: error: illegal character: '\uff5d'
      ?
      ^
Main.java:41: error: illegal character: '\uff5d'
  ?
  ^
Main.java:41: error: reached end of file while parsing
  ?
   ^
3 errors
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		//入力表示
		int N = sc.nextInt();

		Map<String, Integer> map = new HashMap<>();

		int max = 0;
		for (int i = 0; i < N; i++) {
			String S = sc.next();

			if (map.containsKey(S)) {
				map.put(S, map.get(S) + 1);
			} else {
				map.put(S, 1);
			}
			max = Math.max(max, map.get(S));
		}
		List<String> list = new ArrayList<String>();
		for (Map.Entry<String, Integer> key : map.entrySet()) {
			if (key.getValue() == max) {
				list.add(key.getKey());
			}
		}
		Collections.sort(list);
		for (String S : list) {
			System.out.println(S);
		}

Compiler output:
Main.java:39: error: reached end of file while parsing
		}
		 ^
1 error
Language: C++

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

#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define int __int64

#define sc(n) scanf("%lld",&n)
#define scc(n1,n2) scanf("%lld %lld",&n1,&n2)
#define sccc(n1,n2,n3) scanf("%lld %lld %lld",&n1,&n2,&n3)
#define debug(x) cerr<<#x<<": "<<x<<endl;

signed main() {
    int t;
    cin>>t;
    set<string> s;
    while(t--){

       string str;
       cin>>str;
       s.insert(str);
    }
    for(auto x: s) cout<<x<<endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
    5 | #define int __int64
      |             ^~~~~~~
a.cc:13:5: note: in expansion of macro 'int'
   13 |     int t;
      |     ^~~
a.cc:14:10: error: 't' was not declared in this scope; did you mean 'tm'?
   14 |     cin>>t;
      |          ^
      |          tm
Language: C++

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

int main(){
	int n;cin>>n;
  map<string,int > votes;
  for(int i=0;i<n;i++){
  	string s;
    cin>>s;
    votes[s]+=1;
  }
  int maxi=0;
  for(map<string, int>::iterator it=votes.begin();it!=votes.end();it++){
  	maxi = max(it->second,maxi);
  }
  for(map<string, int>::iterator it=votes.begin();it!=votes.end();it++){
  	if(it->second==maxi)cout<<it->first<<'\n';
  }
}}

Compiler output:
a.cc:19:2: error: expected declaration before '}' token
   19 | }}
      |  ^
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <cctype>
#include <string>
#include <map>
#include <set>
#include <math.h>
#include <cmath>
#define ll long long

using namespace std;

int main(){

  ll N;
  cin >> N;
  string S;
  map<string,ll>m;
  for (ll i = 0; i < N; i++) {
    cin >> S;
    m[S] += 1;
  }

  int maxv = 0;
  // for (const auto& x : m) {
  //   int v = x.second;
  //   if (v > maxv) maxv = v;
  // }
  for(auto i = m.begin(); i != m.end(); i++) {
      int v = x.second;
      if (v > maxv) maxv = v;
  }

  for(auto i = m.begin(); i != m.end(); i++) {
    if(i->second == maxv){
      cout << i->first << endl;
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:15: error: 'x' was not declared in this scope
   32 |       int v = x.second;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  vector<pair<int,string>> a(N);
  for(int i=0;i<N;i++){
    a.at(i).first=0;
    cin>>a.at(i).second;
  }
  sort(a.begin(),a.end());
  
  int count=1;
  for(int i=0;i<N-1;i++){
    if(a.at(i).second==a.at(i+1).second){
      count++;
      a.at(i).first=count;
    }
    else{
      count=1;
    }
  }
  sort(a.begin(),a.end());
  
  vector<string> ans(N);
  int aa=1;
  ans[0]=a.at(0).second;
  for(int i=0;i<N-1;i++){
    if(a.at(i).first==a..at(i+1).first&&a.at(i).second!=a.at(i+1).second){
      
      ans.push_back(a.at(i+1).second);
      aa++;
    }
    else{
      break;
    }
  }
  for(int i=0;i<aa;i++){
    cout<<ans.at(i);
  }
}
                     


Compiler output:
a.cc: In function 'int main()':
a.cc:28:25: error: expected unqualified-id before '.' token
   28 |     if(a.at(i).first==a..at(i+1).first&&a.at(i).second!=a.at(i+1).second){
      |                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  vector<pair<int,string>> a(N);
  for(int i=0;i<N;i++){
    a.first.at(i)=0;
    cin>>a.second.at(i);
  }
  sort(a.begin(),a.end());
  
  int count=1;
  for(int i=0;i<N-1;i++){
    if(a.second.at(i)==a.second.at(i+1)){
      count++;
      a.first.at(i)=count;
    }
    else{
      count=1;
    }
  }
  sort(a.begin(),a.end());
  
  vector<string> ans(N);
  int aa=1;
  ans[0]=a.second.at(0);
  for(int i=0;i<N-1;i++){
    if(a.first.at(i)==a.first.at(i+1)&&a.second.at(i)!=a.second.at(i+1)){
      
      ans.push_back(a.second.at(i+1));
      aa++;
    }
    else{
      break;
    }
  }
  for(int i=0;i<aa;i++){
    cout<<ans.at(i);
  }
}
                     

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'first'
    7 |     a.first.at(i)=0;
      |       ^~~~~
a.cc:8:12: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'second'
    8 |     cin>>a.second.at(i);
      |            ^~~~~~
a.cc:14:10: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'second'
   14 |     if(a.second.at(i)==a.second.at(i+1)){
      |          ^~~~~~
a.cc:14:26: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'second'
   14 |     if(a.second.at(i)==a.second.at(i+1)){
      |                          ^~~~~~
a.cc:16:9: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'first'
   16 |       a.first.at(i)=count;
      |         ^~~~~
a.cc:26:12: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'second'
   26 |   ans[0]=a.second.at(0);
      |            ^~~~~~
a.cc:28:10: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'first'
   28 |     if(a.first.at(i)==a.first.at(i+1)&&a.second.at(i)!=a.second.at(i+1)){
      |          ^~~~~
a.cc:28:25: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'first'
   28 |     if(a.first.at(i)==a.first.at(i+1)&&a.second.at(i)!=a.second.at(i+1)){
      |                         ^~~~~
a.cc:28:42: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'second'
   28 |     if(a.first.at(i)==a.first.at(i+1)&&a.second.at(i)!=a.second.at(i+1)){
      |                                          ^~~~~~
a.cc:28:58: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'second'
   28 |     if(a.first.at(i)==a.first.at(i+1)&&a.second.at(i)!=a.second.at(i+1)){
      |                                                          ^~~~~~
a.cc:30:23: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'second'
   30 |       ans.push_back(a.second.at(i+1));
      |                       ^~~~~~
Language: Java

import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Poll155C {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		Map<String,Integer> poll = new TreeMap<String,Integer>();

		String b = scan.next();
		poll.put(b,1);

		for(int i=1;i<n;i++) {
			String S = scan.next();

			//マップに指定した文字列が存在しないとき
			if(!poll.containsKey(S)) {

				//指定した文字列のキーと値をマップに関連付ける
				poll.put(S, 1);
				}else {
					//
					poll.replace(S,poll.get(S)+1);
				}
		}

		int S = 0;
		for(String k:poll.keySet()) {
			S = Math.max(S, poll.get(k));
		}

		for(String k:poll.keySet()) {
			if(S == poll.get(k)) {
				System.out.println(k);
			}
		}


		scan.close();

	}

}


Compiler output:
Main.java:4: error: class Poll155C is public, should be declared in a file named Poll155C.java
public class Poll155C {
       ^
1 error