criyle/codenet-compile-errors huggingface dataset:
Language: Java

import apple.laf.JRSUIUtils;

import javax.print.DocFlavor;
import java.awt.*;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.List;
import java.util.stream.Collectors;

public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int N = nextInt();
        Map<String, Integer> map = new TreeMap<>();

        int max = 0;
        for(int i=0; i<N; i++){
            String S = next();
            if(map.containsKey(S)){
                map.put(S, map.get(S)+1);
            }else{
                map.put(S, 1);
            }
            max = Math.max(max, map.get(S));
        }

        for(String key : map.keySet()){
            if(map.get(key) == max){
                println(key);
            }
        }
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
}


Compiler output:
Main.java:1: error: package apple.laf does not exist
import apple.laf.JRSUIUtils;
                ^
1 error
Language: C++

#include<iostream>
#include<string>
#include<map>
#include<algorithm>
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;
  pair<string,int> p;
  for(p:mp) mx=max(mx,p.second);
  pair<string,int> p;
  for(p:mp) {
    if(p.second!=mx) continue;
    cout<<p.first<<endl;
  }
  return 0;
}
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: found ':' in nested-name-specifier, expected '::'
   18 |   for(p:mp) mx=max(mx,p.second);
      |        ^
      |        ::
a.cc:18:7: error: 'p' is not a class, namespace, or enumeration
   18 |   for(p:mp) mx=max(mx,p.second);
      |       ^
a.cc:19:21: error: expected initializer before ';' token
   19 |   pair<string,int> p;
      |                     ^
a.cc:19:21: error: could not convert 'p' from 'std::pair<std::__cxx11::basic_string<char>, int>' to 'bool'
   19 |   pair<string,int> p;
      |                     ^
      |                     |
      |                     std::pair<std::__cxx11::basic_string<char>, int>
a.cc:20:3: error: expected primary-expression before 'for'
   20 |   for(p:mp) {
      |   ^~~
a.cc:19:22: error: expected ')' before 'for'
   19 |   pair<string,int> p;
      |                      ^
      |                      )
   20 |   for(p:mp) {
      |   ~~~                 
a.cc:18:6: note: to match this '('
   18 |   for(p:mp) mx=max(mx,p.second);
      |      ^
a.cc:20:8: error: found ':' in nested-name-specifier, expected '::'
   20 |   for(p:mp) {
      |        ^
      |        ::
a.cc:20:7: error: 'p' is not a class, namespace, or enumeration
   20 |   for(p:mp) {
      |       ^
a.cc:24:3: error: expected primary-expression before 'return'
   24 |   return 0;
      |   ^~~~~~
a.cc:23:4: error: expected ';' before 'return'
   23 |   }
      |    ^
      |    ;
   24 |   return 0;
      |   ~~~~~~
a.cc:24:3: error: expected primary-expression before 'return'
   24 |   return 0;
      |   ^~~~~~
a.cc:23:4: error: expected ')' before 'return'
   23 |   }
      |    ^
      |    )
   24 |   return 0;
      |   ~~~~~~
a.cc:20:6: note: to match this '('
   20 |   for(p:mp) {
      |      ^
Language: C

n = gets.to_i
s = []
n.times do |i|
  s[i] = gets
end

name = s.uniq
ind = []
name.size.times do |i|
  ind.push(s.count(name[i]))
end
ind.sort_by!{|item| item}
i = name.size - 1
name.size.times do
  puts (name[i])
  i -= 1
end

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n = gets.to_i
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: 'gets' undeclared here (not in a function)
    1 | n = gets.to_i
      |     ^~~~
main.c:2:1: error: expected ',' or ';' before 's'
    2 | s = []
      | ^
main.c:13:1: warning: data definition has no type or storage class
   13 | i = name.size - 1
      | ^
main.c:13:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:13:5: error: 'name' undeclared here (not in a function)
   13 | i = name.size - 1
      |     ^~~~
main.c:14:1: error: expected ',' or ';' before 'name'
   14 | name.size.times do
      | ^~~~
Language: C++

N = int(input())
a = [input()for i in range(N)]
p = []
a.sort()
q = 1
for i  in range(N-1):
    if a[i] == a[i+1]:
        q = q+1
    else:
        p.append([q,a[i]])
        q = 1
p.append([q,a[N-1]])
s = 0
for i in range(len(p)):
    s = max(s,p[i][0])
for i in range(len(p)):
    if p[i][0] == s:
        print(p[i][1])

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define Rep(i,s,n) for(int i=s;i<n;i++)
#define fi first
#define se second
#define all(c) c.begin(),c.end()
typedef long long int ll;
typedef pair<int, int> P;
typedef long double ld;
void Ans(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}

const ll INF=1001001001;
const ll mod=10000000007;

int main(){
  int n;cin>>n;
  map<string,int> mp;
  int m=0;
  rep(i,n){
    string s;
    cin>>s;
    mp[s]++;
    m=max(m,mp[s]);
  }
  
  for(auto p:mp){
    if(mp.se==m) cout<<mp.fi<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'class std::map<std::__cxx11::basic_string<char>, int>' has no member named 'second'
    6 | #define se second
      |            ^~~~~~
a.cc:28:11: note: in expansion of macro 'se'
   28 |     if(mp.se==m) cout<<mp.fi<<endl;
      |           ^~
a.cc:5:12: error: 'class std::map<std::__cxx11::basic_string<char>, int>' has no member named 'first'
    5 | #define fi first
      |            ^~~~~
a.cc:28:27: note: in expansion of macro 'fi'
   28 |     if(mp.se==m) cout<<mp.fi<<endl;
      |                           ^~
Language: C++

#include<bits/stdc++.h>
#define forr(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i,n) for(int i = 0; i < (n); i++)
#define rrep(i,n) for(int i = 1; i <= (n); i++)
#define ALL(a) (a.begin()),(a.end())
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll, ll> LP;
const ll LINF = 1LL<<60;
const int INF = 1001001001;
const int MOD = 1000000007;

/* --------------------------------------------------- */

int n;
map<string, int> m;

int main() {
    cin >> n;
    rep(i, n) {
        string s;
        cin >> s;
        m[s]++;
    }
    
    int maxv = -1;
    for(const auto& x : m) {
        int value = x.second;
        if(value > maxv) maxv = value;
    }
    for(auto i = m.begin(); i != m.end(); i++) {
        if(i->second == maxv) {
            cout << it->first << endl;
        }
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:21: error: 'it' was not declared in this scope; did you mean 'i'?
   34 |             cout << it->first << endl;
      |                     ^~
      |                     i
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
  int n,a;
  cin >> n;
  vector<string> v;
  for(int i=0;i<n;i++){
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(),v.end());
  int Max=0;
  int cnt=1;
  for(int i=1;i<n;i++){
    if(v[i]==v[i-1]){
      cnt++;
    }else{
      Max = max(Max,cnt);
      cnt = 1;
    }
  }
  Max = max(Max,cnt);
  cnt = 1;
  for(int i=1;i<n;i++){
    if(v[i]==v[i-1]){
      cnt++;
    }else{
      if(Max==cnt){
        cout << v[i-1] << endl;
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: no matching function for call to 'std::vector<std::__cxx11::basic_string<char> >::push_back(int&)'
   11 |     v.push_back(a);
      |     ~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/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::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'int' to 'const std::vector<std::__cxx11::basic_string<char> >::value_type&' {aka 'const std::__cxx11::basic_string<char>&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; value_type = std::__cxx11::basic_string<char>]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'int' to 'std::vector<std::__cxx11::basic_string<char> >::value_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<pair<string,int>> m;
  string s;
  for(int i=0;i<n;i++){
    cin >> s;
    bool b = true;
    for(int j=0;j<m.size();j++){
      if(m[j].first==s){
        m[j].second += 1;
        b = false;
        break;
      }
    }
    if(b){
      m.push_back(make_pair(s,1));
    }
  }
  int max_val = 0;
  for(int i=1;i<m.size();i++){
    if(m[max_ind].second<m[i].second){
      max_val = m[i].second;
    }
  }
  vector<string> max_str;
  for(int i=0;i<m.size();i++){
    if(m[i].second==max_val){
      max_str.push_back(m[i].first);
    }
  }
  sort(max_str.begin(),max_str.end());
  for(int i=0;i<max_str.size();i++){
    cout << max_str[i] << endl;
  }
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: 'max_ind' was not declared in this scope
   25 |     if(m[max_ind].second<m[i].second){
      |          ^~~~~~~
a.cc:35:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   35 |   sort(max_str.begin(),max_str.end());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<pair<string,int>> m;
  string s;
  for(int i=0;i<n;i++){
    cin >> s;
    bool b = true;
    for(int j=0;j<m.size();j++){
      if(m[j].first==s){
        m[j].second += 1;
        b = false;
        break;
      }
    }
    if(b){
      m.push_back(make_pair(s,1));
    }
  }
  int max_val = 0;
  vector<int>
  for(int i=1;i<m.size();i++){
    if(m[max_ind].second<m[i].second){
      max_val = m[i].second;
    }
  }
  vector<string> max_str;
  for(int i=0;i<m.size();i++){
    if(m[i].second==max_val){
      max_str.push_back(m[i].first);
    }
  }
  sort(max_str.begin(),max_str.end());
  for(int i=0;i<max_str.size();i++){
    cout << max_str[i] << endl;
  }
  return 0;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: expected unqualified-id before 'for'
   25 |   for(int i=1;i<m.size();i++){
      |   ^~~
a.cc:25:15: error: 'i' was not declared in this scope
   25 |   for(int i=1;i<m.size();i++){
      |               ^
a.cc:36:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   36 |   sort(max_str.begin(),max_str.end());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<pair<string,int>> m;
  string s;
  for(int i=0;i<n;i++){
    cin >> s;
    bool b = true;
    for(int j=0;j<m.size();j++){
      if(m[j].first==s){
        m[j].second += 1;
        b = false;
        break;
      }
    }
    if(b){
      m.push_back(make_pair(s,1));
    }
  }
  int max_val = 0;
  vector<int>
  for(int i=1;i<m.size();i++){
    if(m[max_ind].second<m[i].second){
      max_val = m[i].second;
    }
  }
  vector<string> max_str;
  for(int i=0;i<m.size();i++){
    if(m[i].second==max_val){
      max_str.push_back(m[i].first);
    }
  }
  sort(max_str.begin(),max_str.end());
  for(int i=0;i<max_str.size();i++){
    cout << max_str[i] << endl;
  }
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<pair<string,int>> m;
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:25: error: expected primary-expression before '>' token
    6 |   vector<pair<string,int>> m;
      |                         ^~
a.cc:6:28: error: 'm' was not declared in this scope
    6 |   vector<pair<string,int>> m;
      |                            ^
a.cc:23:10: error: expected primary-expression before 'int'
   23 |   vector<int>
      |          ^~~
a.cc:24:15: error: 'i' was not declared in this scope
   24 |   for(int i=1;i<m.size();i++){
      |               ^
a.cc:29:16: error: expected primary-expression before '>' token
   29 |   vector<string> max_str;
      |                ^
a.cc:29:18: error: 'max_str' was not declared in this scope
   29 |   vector<string> max_str;
      |                  ^~~~~~~
a.cc:35:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   35 |   sort(max_str.begin(),max_str.end());
      |   ^~~~
      |   short
Language: C++

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

int main(){
	// sengen
	int n;
	// nyuryoku
	cin >> n;
	vector<string> s(n);
	map<string,int> m;
	for(int i=0;i<n;i++){
		cin >> s[i];
		m[s[i]]++;
	}
	// keisan
	int max = 0;
	for(auto x:m){
		max = max(max,x.second);
	}
	for(auto x:m){
		if(x.second == max){
			cout << x.first << endl;
		}
	}
	// syutsuryoku
}

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

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

int main(){
	// sengen
	int n;
	// nyuryoku
	cin >> n;
	vector<string> s(n);
	map<string,int> m;
	for(int i=0;i<n;i++){
		cin >> s[i];
		m[s]++;
	}
	// keisan
	int max = 0;
	for(auto x:m){
		max = max(max,x.second);
	}
	for(auto x:m){
		if(x.second == max){
			cout << x.first << endl;
		}
	}
	// syutsuryoku
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and 'std::vector<std::__cxx11::basic_string<char> >')
   13 |                 m[s]++;
      |                  ^
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 'std::vector<std::__cxx11::basic_string<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 'std::vector<std::__cxx11::basic_string<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:18:26: error: 'max' cannot be used as a function
   18 |                 max = max(max,x.second);
      |                       ~~~^~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <map>
#define rep(i,n) for (int i=0;i<(n);++i)
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    map<string, int> mp;//mp=出現回数
    int ma = 0;
    rep(i,N){
        string s;
        cin >> s;
        mp[s]++;
        chmax(ma, mp[s]);
    }
    vector<string> ans;//最大のもの
    for(auto x : mp){
        if(x.second == ma) ans.push_back(x.first);
    }
    rep(i,ans.size()) cout << ans[i] << endl;
}
//ボンドさんの


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'vector' was not declared in this scope
   20 |     vector<string> ans;//最大のもの
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <map>
  +++ |+#include <vector>
    3 | #define rep(i,n) for (int i=0;i<(n);++i)
a.cc:20:18: error: expected primary-expression before '>' token
   20 |     vector<string> ans;//最大のもの
      |                  ^
a.cc:20:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |     vector<string> ans;//最大のもの
      |                    ^~~
      |                    abs
Language: C++

#include <iostream>
#include <map>
#include <chmax>
#define rep(i,n) for (int i=0;i<(n);++i)
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    map<string, int> mp;//mp=出現回数
    int ma = 0;
    rep(i,N){
        string s;
        cin >> s;
        mp[s]++;
        chmax(ma, mp[s]);
    }
    vector<string> ans;//最大のもの
    for(auto x : mp){
        if(x.second == ma) ans.push_back(x.first);
    }
    rep(i,ans.size()) cout << ans[i] << endl;
}
//ボンドさんの


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

#include <iostream>
#include <map>
#define rep(i,n) for (int i=0;i<(n);++i)
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    map<string, int> mp;//mp=出現回数
    int ma = 0;
    rep(i,N){
        string s;
        cin >> s;
        mp[s]++;
        chmax(ma, mp[s]);
    }
    vector<string> ans;//最大のもの
    for(auto x : mp){
        if(x.second == ma) ans.push_back(x.first);
    }
    rep(i,ans.size()) cout << ans[i] << endl;
}
//ボンドさんの


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'chmax' was not declared in this scope
   17 |         chmax(ma, mp[s]);
      |         ^~~~~
a.cc:19:5: error: 'vector' was not declared in this scope
   19 |     vector<string> ans;//最大のもの
      |     ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <map>
  +++ |+#include <vector>
    3 | #define rep(i,n) for (int i=0;i<(n);++i)
a.cc:19:18: error: expected primary-expression before '>' token
   19 |     vector<string> ans;//最大のもの
      |                  ^
a.cc:19:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |     vector<string> ans;//最大のもの
      |                    ^~~
      |                    abs
Language: C++

#include <iostream>
#define rep(i,n) for (int i=0;i<(n);++i)
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    map<string, int> mp;//mp=出現回数
    int ma = 0;
    rep(i,N){
        string s;
        cin >> s;
        mp[s]++;
        chmax(ma, mp[s]);
    }
    vector<string> ans;//最大のもの
    for(auto x : mp){
        if(x.second == ma) ans.push_back(x.first);
    }
    rep(i,ans.size()) cout << ans[i] << endl;
}
//ボンドさんの

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'map' was not declared in this scope
   10 |     map<string, int> mp;//mp=出現回数
      |     ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | #define rep(i,n) for (int i=0;i<(n);++i)
a.cc:10:15: error: expected primary-expression before ',' token
   10 |     map<string, int> mp;//mp=出現回数
      |               ^
a.cc:10:17: error: expected primary-expression before 'int'
   10 |     map<string, int> mp;//mp=出現回数
      |                 ^~~
a.cc:15:9: error: 'mp' was not declared in this scope; did you mean 'ma'?
   15 |         mp[s]++;
      |         ^~
      |         ma
a.cc:16:9: error: 'chmax' was not declared in this scope
   16 |         chmax(ma, mp[s]);
      |         ^~~~~
a.cc:18:5: error: 'vector' was not declared in this scope
   18 |     vector<string> ans;//最大のもの
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #define rep(i,n) for (int i=0;i<(n);++i)
a.cc:18:18: error: expected primary-expression before '>' token
   18 |     vector<string> ans;//最大のもの
      |                  ^
a.cc:18:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |     vector<string> ans;//最大のもの
      |                    ^~~
      |                    abs
a.cc:19:18: error: 'mp' was not declared in this scope; did you mean 'ma'?
   19 |     for(auto x : mp){
      |                  ^~
      |                  ma
Language: Java

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
  public static void main(String[] args) {
            ArrayList<String> name = new ArrayList<>();
               ArrayList<Integer> count = new ArrayList<>();
                 ArrayList<String> ans = new ArrayList<>();
               
                  int max=0,n;
               Scanner input=new Scanner(System.in);
                 Scanner inputa=new Scanner(System.in);
                 
             
                 n=inputa.nextInt();
                // inputa.nextLine();
                 
                 for (int i = 0; i < n; i++) {
                     int c;
                      String s;
                        
                        
                        s=input.nextLine();
                       // input.nextLine();
                 
                 
                     if(name.isEmpty()|| !(name.contains(s))){
                         name.add(s);
                         count.add(1);
                        c=1;
                     
                     }
                     else{
                     
                         
                          int k=name.indexOf(s);
                           c=count.get(k);
                          ++c;
                          
                         count.set(k,c);
                     
                     }
                     if(c>max)
                          max=c;
                     
         
                     
        }
                 
               
                         
                         
                     
                 for (int i = 0; i < count.size(); i++) {
                  if(count.get(i)==max){
                  ans.add(name.get(i));
                  }
                    
            
        }
               Collections.sort(ans);
                 
                
            
                     for (String i : ans) {
      System.out.println(i);
    }
              
    }

Compiler output:
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
  public static void main(String[] args) {
                ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pint pair<int, int>
#define pll pair<ll, ll>
#define vint vector<int >
#define vll vector<ll >
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i,n) for (int i = 0; i < (n); ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
int main(){
    int n,Max=0;
    cin >> n;
    vector<string > s(n);
    REP(i,n) cin >> s[i];
    map<string,int> m;
    REP(i,n){
       m[s[i]]++;
       int x = m[s[i]];
       Max = max(Max, x);
    }
    for(map<string,int>::iterator i=m.begin(); i != m.end(); ++i){
        if(i->second == Max) cout << i->first << endl;
    }
    
    return 0;
}#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pint pair<int, int>
#define pll pair<ll, ll>
#define vint vector<int >
#define vll vector<ll >
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i,n) for (int i = 0; i < (n); ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
int main(){
    int n,Max=0;
    cin >> n;
    vector<string > s(n);
    REP(i,n) cin >> s[i];
    map<string,int> m;
    REP(i,n){
       m[s[i]]++;
       int x = m[s[i]];
       Max = max(Max, x);
    }
    for(map<string,int>::iterator i=m.begin(); i != m.end(); ++i){
        if(i->second == Max) cout << i->first << endl;
    }
    
    return 0;
}

Compiler output:
a.cc:30:2: error: stray '#' in program
   30 | }#include <bits/stdc++.h>
      |  ^
a.cc:30:3: error: 'include' does not name a type
   30 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:40:11: error: redefinition of 'const int INF'
   40 | const int INF = 100100100;
      |           ^~~
a.cc:11:11: note: 'const int INF' previously defined here
   11 | const int INF = 100100100;
      |           ^~~
a.cc:41:11: error: redefinition of 'const int MOD'
   41 | const int MOD = (int)1e9 + 7;
      |           ^~~
a.cc:12:11: note: 'const int MOD' previously defined here
   12 | const int MOD = (int)1e9 + 7;
      |           ^~~
a.cc:42:14: error: redefinition of 'const double EPS'
   42 | const double EPS = 1e-9;
      |              ^~~
a.cc:13:14: note: 'const double EPS' previously defined here
   13 | const double EPS = 1e-9;
      |              ^~~
a.cc:43:5: error: redefinition of 'int main()'
   43 | int main(){
      |     ^~~~
a.cc:14:5: note: 'int main()' previously defined here
   14 | int main(){
      |     ^~~~
Language: C

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

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

Compiler output:
main.c: In function 'main':
main.c:16:24: error: passing argument 4 of 'qsort' from incompatible pointer type [-Wincompatible-pointer-types]
   16 |         qsort(s, n, 11,strcmp);
      |                        ^~~~~~
      |                        |
      |                        int (*)(const char *, const char *)
In file included from main.c:3:
/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:18:12: error: assignment to expression with array type
   18 |         cnt=0;
      |            ^
Language: C++

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

int main() {
	int N;
	cin>>N;
	
	map<string,int> zisyo;
	for(int i=0;i<N;i++){
		string s;
		cin>>s;
		zisyo[i]++;
	}
	
	int saihin=0;
	for(auto z:zisyo){
		saihin=max(saihin,z.second);
	}
	
	for(auto z:zisyo){
		if(z.second==saihin)cout<<z.first<<endl;
	}
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and 'int')
   13 |                 zisyo[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 '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: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,mxx=0;
    string s;
    map <string , int> maap;
    map <string , int> :: iterator it;
    cin>>n;
    for(int i=0;i<n;i++)
        {
        cin>>s;
        maap[s]++;
        }
    for(it=maap.begin();it!=maap.end();it++)
        {
            if(it->second>mxx){
                mxx=it>second;
            }
        }
    for(it=maap.begin();it!=maap.end();it++)
        {
            if(mxx==it->second){
                cout<<it->first<<endl;
            }
        }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: 'second' was not declared in this scope
   18 |                 mxx=it>second;
      |                        ^~~~~~
Language: Java


package Poll;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;


public class Poll {
    public static void main(String[] args) {
            ArrayList<String> name = new ArrayList<>();
               ArrayList<Integer> count = new ArrayList<>();
                 ArrayList<String> ans = new ArrayList<>();
               
                  int max=0,n;
               Scanner input=new Scanner(System.in);
                 Scanner inputa=new Scanner(System.in);
                 n=inputa.nextInt();
                 
                 for (int i = 0; i < n; i++) {
                     int c;
                     String s=input.nextLine();
                     if(name.isEmpty()|| !(name.contains(s))){
                         name.add(s);
                         count.add(1);
                        c=1;
                     
                     }
                     else{
                     
                         
                          int k=name.indexOf(s);
                           c=count.get(k);
                          ++c;
                          
                         count.set(k,c);
                     
                     }
                     if(c>max)
                          max=c;
                     
            
                     
        }
                 
               
                         
                         
                     
                 for (int i = 0; i < count.size(); i++) {
                  if(count.get(i)==max){
                  ans.add(name.get(i));
                  }
                    
            
        }
               Collections.sort(ans);
                 
                
            
                     for (String i : ans) {
      System.out.println(i);
    }
              
    }
        
}


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


import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

/**
 *
 * @author ASUS
 */
public class Poll {
    public static void main(String[] args) {
            ArrayList<String> name = new ArrayList<>();
               ArrayList<Integer> count = new ArrayList<>();
                 ArrayList<String> ans = new ArrayList<>();
               
                  int max=0,n;
               Scanner input=new Scanner(System.in);
                 Scanner inputa=new Scanner(System.in);
                 n=inputa.nextInt();
                 
                 for (int i = 0; i < n; i++) {
                     int c;
                     String s=input.nextLine();
                     if(name.isEmpty()|| !(name.contains(s))){
                         name.add(s);
                         count.add(1);
                        c=1;
                     
                     }
                     else{
                     
                         
                          int k=name.indexOf(s);
                           c=count.get(k);
                          ++c;
                          
                         count.set(k,c);
                     
                     }
                     if(c>max)
                          max=c;
                     
            
                     
        }
                 
               
                         
                         
                     
                 for (int i = 0; i < count.size(); i++) {
                  if(count.get(i)==max){
                  ans.add(name.get(i));
                  }
                    
            
        }
               Collections.sort(ans);
                 
                
            
                     for (String i : ans) {
      System.out.println(i);
    }
              
    }
        
}


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

 public static void main(String[] args) {
            ArrayList<String> name = new ArrayList<>();
               ArrayList<Integer> count = new ArrayList<>();
                 ArrayList<String> ans = new ArrayList<>();
               
                  int max=0,n;
               Scanner input=new Scanner(System.in);
                 Scanner inputa=new Scanner(System.in);
                 n=inputa.nextInt();
                 
                 for (int i = 0; i < n; i++) {
                     int c;
                     String s=input.nextLine();
                     if(name.isEmpty()|| !(name.contains(s))){
                         name.add(s);
                         count.add(1);
                        c=1;
                     
                     }
                     else{
                     
                         
                          int k=name.indexOf(s);
                           c=count.get(k);
                          ++c;
                          
                         count.set(k,c);
                     
                     }
                     if(c>max)
                          max=c;
                     
            
                     
        }
                 
               
                         
                         
                     
                 for (int i = 0; i < count.size(); i++) {
                  if(count.get(i)==max){
                  ans.add(name.get(i));
                  }
                    
            
        }
               Collections.sort(ans);
                 
                
            
                     for (String i : ans) {
      System.out.println(i);
    }
              
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
 public static void main(String[] args) {
               ^
  (use --enable-preview to enable unnamed classes)
1 error
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.at(i);
  }
  vector<pair<int,string>>SS(0);
  SS.push_buck((1,S.at(0)));
  if(N>1){
    for(int i=1;i<N;i++){
      bool flag=false;
      for(int j=0;j<SS.size();j++){
        if(S.at(i)==SS.at(j).second){
          SS.at(j).first=SS.at(j).first+1;
          flag=true;
        }
      }
      if(flag==false){
        SS.push_back(1,S.at(i));
      }
    }
  }
  sort(SS.begin(),SS.end());
  reverse(SS.begin(),SS.end());
  int M=SS.at(0).first;
  for(int i=0;i<SS.size();i++){
    if(SS.at(i).first==M){
      cout<<SS.at(i).second<<endl;
    }
  }
}
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'push_buck'; did you mean 'push_back'?
   11 |   SS.push_buck((1,S.at(0)));
      |      ^~~~~~~~~
      |      push_back
a.cc:22:21: error: no matching function for call to 'std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::push_back(int, __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   22 |         SS.push_back(1,S.at(i));
      |         ~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: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>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<string>S(N);
  for(int i=0;i<N;i++){
    cin>>S.at(i);
  }
  vector<pair<int,string>>SS(0);
  SS.push_buck(1,S.at(0));
  if(N>1){
    for(int i=1;i<N;i++){
      bool flag=false;
      for(int j=0;j<SS.size();j++){
        if(S.at(i)==SS.at(j).second){
          SS.at(j).first=SS.at(j).first+1;
          flag=true;
        }
      }
      if(flag==false){
        SS.push_back(1,S.at(i));
      }
    }
  }
  sort(SS.begin(),SS.end());
  reverse(SS.begin(),SS.end());
  int M=SS.at(0).first;
  for(int i=0;i<SS.size();i++){
    if(SS.at(i).first==M){
      cout<<SS.at(i).second<<endl;
    }
  }
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'class std::vector<std::pair<int, std::__cxx11::basic_string<char> > >' has no member named 'push_buck'; did you mean 'push_back'?
   11 |   SS.push_buck(1,S.at(0));
      |      ^~~~~~~~~
      |      push_back
a.cc:22:21: error: no matching function for call to 'std::vector<std::pair<int, std::__cxx11::basic_string<char> > >::push_back(int, __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   22 |         SS.push_back(1,S.at(i));
      |         ~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: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>

using namespace std;
typedef long long ll;
typedef vector<ll> vl ;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;

#define rep(i,N) for(int i=0; i < (int)N; i++)
#define all(v) (v).begin(),(v).end()

const int INF = 100000002;

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'stirng' was not declared in this scope
   19 |                 stirng s; cin >> s;
      |                 ^~~~~~
a.cc:19:34: error: 's' was not declared in this scope
   19 |                 stirng s; cin >> s;
      |                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  map<string,int> votes;
  int n;
  cin>>n;
  int maxvotes=-1;
  for(int i=0;i<n;i++){
    string s;int v;
    cin>>s>>v;
    votes[s]=v;
    maxvotes=max(maxvotes,v);
  }
  for(map<string,int>:: iterator it=votes.begin();it!=votes.end();i++){
    if(it->second==maxvotes)	cout<<it->first<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:67: error: 'i' was not declared in this scope; did you mean 'it'?
   14 |   for(map<string,int>:: iterator it=votes.begin();it!=votes.end();i++){
      |                                                                   ^
      |                                                                   it
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  map<string,int> M;
  for(int i=0;i<N;i++){
  string s;
    cin>>s;
    if(!M.count(s))
      M.at(s)=1;
    else
      M.at(s)+=1;
  }int Max=0;
  
  for(auto p:M){
   auto k=p.first
     auto v=p.second;
    if(Max<=v)
      Max=v;
    
  }for(auto p:M){
  auto k=p.first;
    auto v=p.second;
    if(v=Max)
      cout<<k<<endl;
  
  }
  
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:6: error: expected ',' or ';' before 'auto'
   18 |      auto v=p.second;
      |      ^~~~
a.cc:19:13: error: 'v' was not declared in this scope
   19 |     if(Max<=v)
      |             ^
Language: C++

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

int main(){
	int n;
	cin>>n;
	string s[n];
	map<string,int> mp;
	rep(i,n){
		cin>>s[i];
		mp[s[i]]++;
	}
	int ma=0;
	for(auto p:mp)ma=max(ma,p.second);
	for(auto p:mp){
		if(p.second == mq)puts(p.first);
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:32: error: 'mq' was not declared in this scope; did you mean 'ma'?
   20 |                 if(p.second == mq)puts(p.first);
      |                                ^~
      |                                ma
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:32: error: 'mx' was not declared in this scope; did you mean 'ma'?
   20 |                 if(p.second == mx)puts(p.first);
      |                                ^~
      |                                ma