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

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

int main() {

  int n;
  cin >> n;
  
  vector<string> name(n);
  for(int i=0; i<n; i++)
    cin >> name.at(i)
    
  sort(v.begin(),v.end())
  
  vector<int> count(n);
  
  for(int i=0; i<n; i++) {
    for(int j=i;  j<n-1; j++){
      
      if(name.at(i) == name.at(j+1))
      	count.at(i)++ ;
	else
	  break;
    }
  }
  for(int i=0; i<n; i++){
    for(int j=0; j<n; j++){
 
      if(count.at(i) < count.at(j))
        break;
      if(j == n-1)
      cout << name.at(i) << endl;
    }
  }
  
}
      
   

Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ';' before 'sort'
   11 |     cin >> name.at(i)
      |                      ^
      |                      ;
   12 | 
   13 |   sort(v.begin(),v.end())
      |   ~~~~                
a.cc:21:15: error: overloaded function with no contextual type information
   21 |         count.at(i)++ ;
      |               ^~
a.cc:29:16: error: overloaded function with no contextual type information
   29 |       if(count.at(i) < count.at(j))
      |                ^~
a.cc:29:30: error: overloaded function with no contextual type information
   29 |       if(count.at(i) < count.at(j))
      |                              ^~
Language: C++

#include<bits/stdc++.h>

#define all(vec)                vec.begin(),vec.end()
#define rall(vec)               vec.rbegin(),vec.rend()
#define sz(r)                    r.size()
#define rem1(v, i)             (v.erase(v.begin()+i))
#define rem2(v, i, j)          (v.erase(v.begin()+i, v.begin()+j+1))
#define rev(v, i, j)             (reverse(v.begin()+i, v.begin()+j+1))
#define digits(i)               (int)((log(i)/log(10))+1)
#define dround(num)       (int)floor(num+0.5)  // Rounds num to int (int)num+(<.5 to 0, > .5 to 1)
#define first_bit_index(num) __builtin_ctz(num) // count trailing zeros
#define last_bit_index(num)  __builtin_clz(num) // count leading zeros
#define UNDEFINED_BIT       32
#define test_bit(num, bit)   ((num & 1 << bit) != 0)
#define num_bits(num)       __builtin_popcount(num)
#define pb push_back
#define pf push_front
#define ins insert

#define inf   INT_MAX
#define mn_inf  INT_MIN
#define endl '\n'
using namespace std;
#define init ios_base::sync_with_stdio(false); cin.tie(nullptr);
typedef long long ll;

int main()
{
	init
	// #ifndef ONLINE_JUDGE
	//     freopen("input.txt", "r", stdin);
	// //    freopen("output.txt", "w", stdout);
	// #endif
	int n; cin >> n;
	map<string,int> mp;
	int maxx = 0;
	for (int i = 0; i < n; ++i)
	{
		string s;cin >> s;
		if(mp.find(s) == mp.end())
			mp[s] = 0;
		mp[s]++;
		maxx = max(maxx,mp[s]);
	}
	for(auto& p : mp)
	{
		if(p.second == max)
			cout << p.first <<"\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator=='
   47 |                 if(p.second == max)
      |                    ~~~~~~~~~^~~~~~
Language: C++

#include<iostream>

int main() {
  int n;
  cin >> n;
  vector<string> a(n);
  rep(i, n) cin >> a[i];

  // 1, 2 の手順
  map<string, int> m;
  int maxCount = 0;
  rep(i, n) {
    m[a[i]] = m[a[i]] + 1;
    maxCount = max(maxCount, m[a[i]]);
  }

  // 3 の手順
  vector<string> list;
  for(auto p : m) {
    if(p.second == maxCount) {
      list.push_back(p.first);
    }
  }

  // 4 の手順
  sort(list.begin(), list.end());

  // 5の手順
  rep(i, list.size()) {
    cout << list[i] << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<string> a(n);
      |   ^~~~~~
a.cc:6:10: error: 'string' was not declared in this scope
    6 |   vector<string> a(n);
      |          ^~~~~~
a.cc:6:10: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:18: error: 'a' was not declared in this scope
    6 |   vector<string> a(n);
      |                  ^
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   rep(i, n) cin >> a[i];
      |       ^
a.cc:7:3: error: 'rep' was not declared in this scope
    7 |   rep(i, n) cin >> a[i];
      |   ^~~
a.cc:10:3: error: 'map' was not declared in this scope
   10 |   map<string, int> m;
      |   ^~~
a.cc:10:15: error: expected primary-expression before 'int'
   10 |   map<string, int> m;
      |               ^~~
a.cc:18:18: error: 'list' was not declared in this scope
   18 |   vector<string> list;
      |                  ^~~~
a.cc:19:16: error: 'm' was not declared in this scope
   19 |   for(auto p : m) {
      |                ^
a.cc:26:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   26 |   sort(list.begin(), list.end());
      |   ^~~~
      |   short
Language: C++

int main() {
  int n;
  cin >> n;
  vector<string> a(n);
  rep(i, n) cin >> a[i];

  // 1, 2 の手順
  map<string, int> m;
  int maxCount = 0;
  rep(i, n) {
    m[a[i]] = m[a[i]] + 1;
    maxCount = max(maxCount, m[a[i]]);
  }

  // 3 の手順
  vector<string> list;
  for(auto p : m) {
    if(p.second == maxCount) {
      list.push_back(p.first);
    }
  }

  // 4 の手順
  sort(list.begin(), list.end());

  // 5の手順
  rep(i, list.size()) {
    cout << list[i] << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> n;
      |   ^~~
a.cc:4:3: error: 'vector' was not declared in this scope
    4 |   vector<string> a(n);
      |   ^~~~~~
a.cc:4:10: error: 'string' was not declared in this scope
    4 |   vector<string> a(n);
      |          ^~~~~~
a.cc:4:18: error: 'a' was not declared in this scope
    4 |   vector<string> a(n);
      |                  ^
a.cc:5:7: error: 'i' was not declared in this scope
    5 |   rep(i, n) cin >> a[i];
      |       ^
a.cc:5:3: error: 'rep' was not declared in this scope
    5 |   rep(i, n) cin >> a[i];
      |   ^~~
a.cc:8:3: error: 'map' was not declared in this scope
    8 |   map<string, int> m;
      |   ^~~
a.cc:8:15: error: expected primary-expression before 'int'
    8 |   map<string, int> m;
      |               ^~~
a.cc:16:18: error: 'list' was not declared in this scope
   16 |   vector<string> list;
      |                  ^~~~
a.cc:17:16: error: 'm' was not declared in this scope
   17 |   for(auto p : m) {
      |                ^
a.cc:24:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   24 |   sort(list.begin(), list.end());
      |   ^~~~
      |   short
Language: C++

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

int main(){
  map<string,int> a;
  string buf;
  int N;
  cin >> N;
  
  for(int i=0; i<N; i++){
    cin >> buf;
    if(a.count(buf) == 0)
      a.insert(make_pair(buf,1));
    else
      a[buf]++;
  }

  int max=0;
  vector<string> maxs;
  for(auto i=a.begin(); i!=a.end(); i++){
    //cout << i->first << i->second << endl;
    if(max < i->second){
      maxs.clear();
      max = i->second;
      maxs.push_back(i->first);
    }
    else if(max <= i->second)
      maxs.push_back(i->first);
  }

  sort(maxs.begin(), maxs.end());
  
  for(int i=0; i<maxs.size(); i++)
    cout << maxs[i] << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   33 |   sort(maxs.begin(), maxs.end());
      |   ^~~~
      |   short
Language: C++

//#pragma GCC optimize("O3,unroll-loops")
//#pragma loop_opt(on)
#include <bits/stdc++.h>
//#include <bits/extc++.h>
//using namespace __gnu_pbds;
using namespace std;

#ifdef DEBUG
#define FAST ;
#else
#define FAST ios::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#endif
#define _ <<' '<<
#define Fr(i, s, e) for(auto i = s; i < e; ++i)
#define Ft first
#define Sd second
using ll = long long;
using pii = pair<int, int>;
constexpr ll MAX = 1e6+5;
constexpr ll INF = 2134567890;
constexpr ll MOD = 998244353;

ll fpow(ll b, ll a, ll MOD = MOD) {
    b %= MOD;
    ll r = 1;
    for(; a; b=b*b%MOD, a>>=1)
        a&1 && (r = r*b%MOD);
    return r;
}

signed main() {
    FAST;

    int n;
    cin >> n;
    string s;
    map<string, cnt> mp{};
    Fr(i, 0, n) {
        cin >> s;
        mp[s]++;
    }
    int mx = 0;
    vector<string> ans{};
    for(const auto &it: mp) {
        if (mx < it.Sd) { mx = it.Sd; ans.clear(); }
        if (mx == it.Sd) ans.emplace_back(it.Ft);
    }
    sort(ans.begin(), ans.end());
    for(const auto &s: ans) cout << s << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   38 |     map<string, cnt> mp{};
      |                 ^~~
      |                 int
a.cc:38:20: error: template argument 2 is invalid
   38 |     map<string, cnt> mp{};
      |                    ^
a.cc:38:20: error: template argument 4 is invalid
a.cc:41:11: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   41 |         mp[s]++;
      |           ^
a.cc:45:25: error: 'begin' was not declared in this scope
   45 |     for(const auto &it: mp) {
      |                         ^~
a.cc:45:25: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:3:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:45:25: error: 'end' was not declared in this scope
   45 |     for(const auto &it: mp) {
      |                         ^~
a.cc:45:25: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

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

using namespace std;

bool mycomp(pair<string, int> a, pair<string, int>b) {
    if (a.second == b.second) return a.first.compare(b.first) < 0;
    return a.second > b.second;
}

int main() {
    int N; cin >> N;
    string S;
    map<string, int> cnt;
    for (int i= 0; i<N; i++) {
        cin >> S;
        cnt[S]++;
    }
    vector<pair<string, int>> v;
    for (auto x = cnt.begin(); x != cnt.end(); x++) {
        v.push_back(make_pair(x->first, x->second));
    }
    sort(v.begin(), v.end(), mycomp);
    int max = v[0].second;
    for (auto& x:v) {
        if (max == x.second) {
            cout << x.first << endl;
        }else break;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |     sort(v.begin(), v.end(), mycomp);
      |     ^~~~
      |     short
Language: C++

from collections import Counter

n = int(input())
s = [input() for i in range(n)]
c = Counter(s)
max_ = max(c.values())
c = sorted([k for k, v in c.items() if v == max_])
for a in c:
    print(a)

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

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

int main() {
  int n;cin >> n;
  vector<string> a(n);
  int count=1;
  int MAX=1;
  
  for(int i=0;i<n;i++)
    cin >> a[i];
  
  for(int i=0;i<n-1;i++){
    if(a[i]==a[i+1]) count++;
    else count=1;
    MAX=max(count,MAX);
  }
  
  vector<string> b(0);
  for(int i=0;i<n-1;i++){
    if(a[i]=a[i+1]) count++;
    else count=1;
    if(count==MAX) b.push_back(a[i])
  }
  
  for(int i=0;i<b.size();i++)
    cout << b[i]<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: could not convert '(& a.std::vector<std::__cxx11::basic_string<char> >::operator[](((std::vector<std::__cxx11::basic_string<char> >::size_type)i)))->std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& a.std::vector<std::__cxx11::basic_string<char> >::operator[](((std::vector<std::__cxx11::basic_string<char> >::size_type)(i + 1))))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   21 |     if(a[i]=a[i+1]) count++;
a.cc:23:37: error: expected ';' before '}' token
   23 |     if(count==MAX) b.push_back(a[i])
      |                                     ^
      |                                     ;
   24 |   }
      |   ~
Language: C++

#include <iostream>
#include <unordered_map>
#include <vector>
#include <cmath>

int main()
{
	int N;
	std::cin >> N; std::cin.ignore();

	std::unordered_map<std::string, int> textCountMap;
	std::string S;
	for (int count = 0; count < N; ++count) {
		std::cin >> S; std::cin.ignore();
		textCountMap.emplace(S, textCountMap.count(S) + 1);
	}

	int maxTextCount = 0;
	std::vector<std::string> result;
	result.reserve(N);
	for (std::pair<std::string, int> textAndCount : textCountMap) {
		if (maxTextCount < textAndCount.second) {
			maxTextCount = textAndCount.second;
			if (result.size != 0) {
				result.clear();
			}
			result.emplace_back(textAndCount.first);
		}
	}
	for (std::string output : result) {
		std::cout << output << std::endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:36: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::__cxx11::basic_string<char>; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int]' (did you forget the '()' ?)
   24 |                         if (result.size != 0) {
      |                             ~~~~~~~^~~~
      |                                        ()
Language: C++

#include<iostream>
#include<string>
#include<unordered_map>

int main(void)
{
  int n;
  std::cin >> n;
  
  std::unordered_map<std::string, int> mapCount;
  std::string name;
  int maxNumber = 0;
  for(int count = 0; n > count; ++n)
  {
    mapCount[name] += 1;
    maxNumber = (std::max)(maxNumber, mapCount[name]);
  }
  
  std::vector<std::string> nameList;
  nameList.reserve(mapCount.size());
  for(const std::pair<const std::string, int>& nameToCount : mapCount)
  {
    if(maxNumber != nameToCount.second)
    {
      continue;
    }
    nameList.emplace_back(nameToCount.first);
  }
  std::sort(nameList.begin(), nameList.end());
  for(const std::string& s : nameList)
  {
    std::cout << s << std::endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: 'vector' is not a member of 'std'
   19 |   std::vector<std::string> nameList;
      |        ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include<unordered_map>
  +++ |+#include <vector>
    4 | 
a.cc:19:26: error: expected primary-expression before '>' token
   19 |   std::vector<std::string> nameList;
      |                          ^
a.cc:19:28: error: 'nameList' was not declared in this scope
   19 |   std::vector<std::string> nameList;
      |                            ^~~~~~~~
a.cc:29:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   29 |   std::sort(nameList.begin(), nameList.end());
      |        ^~~~
      |        qsort
Language: Java

import java.util.Scanner;
import java.util.TreeMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;


public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int  max = 1;
    TreeMap<String, Integer> tm = new TreeMap<String,Integer>();
    List<String>keyList =new ArrayList<String>();
     
	for(int i =0; i<N; i++){
      String s = sc.next();
        if(tm.containsKey(s) == true){
           int number = tm.get(s) + 1;  //該当キーの値を１増やす準備
           tm.replace(s, number);
           if(max < number) max = number;
        }else{
           tm.put(s, 1);
           keyList.add(s);
        }
    }
    
    Arrays.sort(keyList);
    
    for(int i=0; i<keyList.size(); i++){
      String s = keyList.get(i);
      int number = tm.get(s);
      if(number == max)
        System.out.println(s);
    }
    
  }
}


Compiler output:
Main.java:28: error: no suitable method found for sort(List<String>)
    Arrays.sort(keyList);
          ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; List<String> cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; List<String> cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; List<String> cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; List<String> cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; List<String> cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; List<String> cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; List<String> cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; List<String> cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

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


public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int  max = 0;
    TreeMap<String, int> tm = new TreeMap<String,int>();
    List<String>keyList =new ArrayList<String>();
     
	for(int i =0; i<N; i++){
      String s = sc.next();
        if(tm.containsKey(s) == true){
           int number = tm.get(s) + 1;  //該当キーの値を１増やす準備
           tm.replace(s, number);
           if(max < number) max = number;
        }else{
           tm.put(s, 1);
           keyList.add(s);
        }
    }
    
    Collections.sort(keyList);
    
    for(int i=0; i<keyList.size(); i++){
      String s = keyList.get(i);
      int number = tm.get(s);
      if(number == max)
        System.out.println(s);
    }
    
  }
}


Compiler output:
Main.java:13: error: unexpected type
    TreeMap<String, int> tm = new TreeMap<String,int>();
                    ^
  required: reference
  found:    int
Main.java:13: error: unexpected type
    TreeMap<String, int> tm = new TreeMap<String,int>();
                                                 ^
  required: reference
  found:    int
2 errors
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;


public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int  max = 0;
    List<String> stringList = new ArrayList<String>();
    List<Integer> numberList = new ArrayList<Integer>();
    
    for(int i=0; i<N; i++){
    	String s = sc.next();
      	if(stringList.contains(s) == true){
            int index = stringList.indexOf(s);
            int number = numberList.get(index);
            numberList.set(index,  number + 1);
            if(max < number + 1)
              max = number + 1;
        } else{
            stringList.add(s);
            numberList.add(1);
        } 
    }
    for(int i=0; i<stringList.size; i++){
        if(numberlist.get(i) == max)
          System.out.println(stringList.get(i));
    }
    
  }
}

Compiler output:
Main.java:27: error: cannot find symbol
    for(int i=0; i<stringList.size; i++){
                             ^
  symbol:   variable size
  location: variable stringList of type List<String>
Main.java:28: error: cannot find symbol
        if(numberlist.get(i) == max)
           ^
  symbol:   variable numberlist
  location: class Main
2 errors
Language: C++

// https://www.acmicpc.net/blog/view/22
// sort stl 사용방법 및 class operator 재정의 방법

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>

using namespace std;

class string {
public:
	char str[11] = { 0, };
	int len;
	string() {}
	string(char input[]) {
		len = strlen(input);
		for (int i = 0; i < len; i++)
			str[i] = input[i];
	}
	bool operator<(string b) {
		for (int i = 0; i < 11; i++) {
			if (str[i] < b.str[i]) return 1;
			else if (str[i] > b.str[i]) return 0;
		}

		return 0;
	}
	bool operator==(string b) {
		if (strlen(b.str) != len) return 0;
		for (int i = 0; i < len; i++) {
			if (str[i] != b.str[i]) return 0;
		}

		return 1;
	}

};

int n;
string dat[200001];


int main(void) {
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		char ch[11];
		scanf("%s", &ch);
		dat[i] = string(ch);
	}
//	sort(dat, dat + n, cmp);
	sort(dat, dat + n);
	printf("\n");
	int cnt[200001] = { 0, }, max = 0;
	for (int i = 0; i < n-1; i++) {
		if (dat[i] == dat[i + 1]) {
			cnt[i+1] = cnt[i]+1;
			if (max < cnt[i+1]) max = cnt[i+1];
		}
		else cnt[i+1] = 0;
	}

	for (int i = 0; i < n; i++) {
		if (cnt[i] == max) {
			printf("%s\n", dat[i].str);
		}
	}

	

	return 0;
}

Compiler output:
a.cc: In constructor 'string::string(char*)':
a.cc:16:23: error: 'strlen' was not declared in this scope
   16 |                 len = strlen(input);
      |                       ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <algorithm>
  +++ |+#include <cstring>
    7 | 
a.cc: In member function 'bool string::operator==(string)':
a.cc:29:21: error: 'strlen' was not declared in this scope
   29 |                 if (strlen(b.str) != len) return 0;
      |                     ^~~~~~
a.cc:29:21: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    map<string, int> mem;
    int n;
    cin >> n;
    rep(i,0,n) {
    	string s;
    	cin >> s;
    	mem[s] += 1;
    }
    int max_v;
    for(const auto& x: mem){
    	int v = x.second;
    	if(v > max_v) max_v = v;
    }
    for(auto i = mem.begin(); i!=mem.end(); ++i){
    	if(i->second == max_v) cout << it->first << "\n";
    }
    



}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:40: error: 'it' was not declared in this scope; did you mean 'i'?
   23 |         if(i->second == max_v) cout << it->first << "\n";
      |                                        ^~
      |                                        i
Language: C++

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    map<string, int> mem;
    int n;
    cin >> n;
    rep(i,0,n) {
    	string s;
    	cin >> s;
    	mem[s] += 1;
    }
    int max_v;
    for(const auto& x: mem){
    	int v = x.second;
    	if(v > max_v) max_v = v;
    }
    for(auto i = memo.begin(); i!=mem.end(); ++i){
    	if(i->second == max_v) cout << it->first << "\n";
    }
    



}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: 'memo' was not declared in this scope; did you mean 'mem'?
   22 |     for(auto i = memo.begin(); i!=mem.end(); ++i){
      |                  ^~~~
      |                  mem
a.cc:23:40: error: 'it' was not declared in this scope; did you mean 'int'?
   23 |         if(i->second == max_v) cout << it->first << "\n";
      |                                        ^~
      |                                        int
Language: C++

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    map<string, int> mem;
    int n;
    cin >> n;
    rep(i,0,n) {
    	string s;
    	cin >> s;
    	mem[s] += 1;
    }
    int max_v;
    for(const auto& x: mem){
    	int v = x.second;
    	if(v > max_v) max_v = v;
    }
    for(auto i = memo.begin(); i!=mem.end(); ++i){
    	if(i->second == max_v) cout << it<-first << "\n";
    }
    



}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: 'memo' was not declared in this scope; did you mean 'mem'?
   22 |     for(auto i = memo.begin(); i!=mem.end(); ++i){
      |                  ^~~~
      |                  mem
a.cc:23:40: error: 'it' was not declared in this scope; did you mean 'int'?
   23 |         if(i->second == max_v) cout << it<-first << "\n";
      |                                        ^~
      |                                        int
a.cc:23:44: error: 'first' was not declared in this scope
   23 |         if(i->second == max_v) cout << it<-first << "\n";
      |                                            ^~~~~
Language: C++

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    map<string, int> mem;
    int n;
    cin >> n;
    rep(i,0,n) {
    	string s;
    	cin >> s;
    	memo[s] += 1;
    }
    int max_v;
    for(const auto& x: mem){
    	int v = x.second;
    	if(v > max_v) max_v = v;
    }
    for(auto i = memo.begin(); i!=mem.end(); ++i){
    	if(i->second == max_v) cout << it<-first << "\n";
    }
    



}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'memo' was not declared in this scope; did you mean 'mem'?
   15 |         memo[s] += 1;
      |         ^~~~
      |         mem
a.cc:22:18: error: 'memo' was not declared in this scope; did you mean 'mem'?
   22 |     for(auto i = memo.begin(); i!=mem.end(); ++i){
      |                  ^~~~
      |                  mem
a.cc:23:40: error: 'it' was not declared in this scope; did you mean 'int'?
   23 |         if(i->second == max_v) cout << it<-first << "\n";
      |                                        ^~
      |                                        int
a.cc:23:44: error: 'first' was not declared in this scope
   23 |         if(i->second == max_v) cout << it<-first << "\n";
      |                                            ^~~~~
Language: C++

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

int main() {
  unordered_map<string, int> m;
  int n;
  cin>>n;
  int mx = 0;
  for(int i = 0; i < n; i++){
    string s;
    cin>>s;
    m[s]++;
    mx = max(mx, m[s]);
  }
  vector<string> results;
  for(pair<string, int> p: m){
  	if(p.second == mx){
    	results.push_back(p.first);
    }
  }
  sort(results.begin(), results.end());
  for(string str: results) {
  	cout<<str<<"\n"
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: expected ';' before '}' token
   23 |         cout<<str<<"\n"
      |                        ^
      |                        ;
   24 |   }
      |   ~
Language: C

// メモ保存として提出
#include <stdio.h>
/*#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
using i64 = int64_t;
using u64 = uint64_t;
using f64 = double;
using f80 = __float80;
*/
typedef long long ll;

void swap(ll *a, ll *b){
  ll tmp = *a;
  *a = *b;
  *b = tmp;
} 

void qsort(ll *pt, ll n){
  ll point = pt + n/2;
  ll select;
  while(1){
    ll tmp = *point;
    for(ll i=pt; i<=point; i++){
      if(*i > point && point > 
    }
  }
  return 0;
}

int main(){
  ll n;
  ll arr[200000][11];
  ll ans[200000][11];
  char tmp[11];
  scanf("%lld", &n);
  //return 0;
  for(ll i=0; i<1/*n*/; i++){
    scanf("%s", &tmp);
    ll len = 0;
    while(tmp[len]){
      arr[i][len] = tmp[len];
      //printf("%c\n", arr[i][len]);
      len++;
    }
  }
  
  printf("s");
  
  return 0;
}

Compiler output:
main.c: In function 'qsort':
main.c:20:14: error: initialization of 'll' {aka 'long long int'} from 'll *' {aka 'long long int *'} makes integer from pointer without a cast [-Wint-conversion]
   20 |   ll point = pt + n/2;
      |              ^~
main.c:23:14: error: invalid type argument of unary '*' (have 'll' {aka 'long long int'})
   23 |     ll tmp = *point;
      |              ^~~~~~
main.c:24:14: error: initialization of 'll' {aka 'long long int'} from 'll *' {aka 'long long int *'} makes integer from pointer without a cast [-Wint-conversion]
   24 |     for(ll i=pt; i<=point; i++){
      |              ^~
main.c:25:10: error: invalid type argument of unary '*' (have 'll' {aka 'long long int'})
   25 |       if(*i > point && point >
      |          ^~
main.c:26:5: error: expected expression before '}' token
   26 |     }
      |     ^
main.c:26:5: error: expected expression before '}' token
main.c:28:10: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   28 |   return 0;
      |          ^
main.c:19:6: note: declared here
   19 | void qsort(ll *pt, ll n){
      |      ^~~~~
Language: C++

#include <iostream>
#include <map>

using namespace std;
int main(void){
    // Your code here!
    int N;
    map <string,int> buffer;
    
    cin >> N;
    
    for(int i = 0 ; i < N; i++){
        string tmp;
        cin >> tmp;
        
        buffer[tmp]++;
        
    }
    
    int maxValue = 0;
    // 上の時点でbuffer内は、文字列(key)で文字がソートされている
    // 最大値を取り出す
    for (const auto localMap : buffer){
        if(localMap->second > maxValue){
            maxValue = localMap->second;
        }
    }
    
    for (const auto localMap : buffer){
        if(maxValue == localMap->second){
            cout << localMap->first << endl;
        }
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: base operand of '->' has non-pointer type 'const std::pair<const std::__cxx11::basic_string<char>, int>'
   24 |         if(localMap->second > maxValue){
      |                    ^~
a.cc:25:32: error: base operand of '->' has non-pointer type 'const std::pair<const std::__cxx11::basic_string<char>, int>'
   25 |             maxValue = localMap->second;
      |                                ^~
a.cc:30:32: error: base operand of '->' has non-pointer type 'const std::pair<const std::__cxx11::basic_string<char>, int>'
   30 |         if(maxValue == localMap->second){
      |                                ^~
a.cc:31:29: error: base operand of '->' has non-pointer type 'const std::pair<const std::__cxx11::basic_string<char>, int>'
   31 |             cout << localMap->first << endl;
      |                             ^~
Language: C++


        cout<<s[t n; scanf("%d", &n); int ans = 0;
    for(int i = 1; i <= n; i ++) {
        cin >> s[i];
   endl;
        #include<or(int i=1;i<=n;i++)
        if(vis[s[i]]==mx)
    {bits/stdc++.h>
using namespace std;
h>
usi
    sort(s+1,s+1+n);
    f     ans = max(ans, ++ Map[s[i]]);
    }
    for(int i = 1; i <= n; i ++) {
        if(Map[s[i]] == ans) {
            Map[s[i]] = 0;
            vec.pb(s[i]);
        }
    }
    sort(vec2e5+5;.begin(), vec.end());
    fo0;
} 
typedef long long ll;
const int N=
map<string,int>vis; : vec) printf("%s\n", s.c_str());
    return  n;
string s[N];
int main()
{
    scanf("%d",&n);
    int
intr(auto s mx=0;
    for(int i=1;i<=n;i++)
    {
        cinvis[s[i]]=0;
    }
}
#ng na
vector<string>>>s[i];vis[s[i]]++;
        mx=max(mx,vis[s[i]]);
    }i]<< vec;
map<string, int> Map;
int main() {
    imespace std;

string s[20

Compiler output:
a.cc:6:38: error: missing terminating > character
    6 |         #include<or(int i=1;i<=n;i++)
      |                                      ^
a.cc:6:17: fatal error: or(int i=1;i<=n;i++): No such file or directory
    6 |         #include<or(int i=1;i<=n;i++)
      |                 ^
compilation terminated.
Language: C++

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

typedef long long ll;
const int N=2e5+5;
map<string,int>vis;
int n;
string s[N];
int main()
{
    scanf("%d",&n);
    int mx=0;
    for(int i=1;i<=n;i++)
    {
        cin>>s[i];vis[s[i]]++;
        mx=max(mx if(vis[s[i]]==mx)
    {
        cout<<s[i]<<endl;
        vis[s[i]]=0;
    }
},vis[s[i]]);
    }
    sort(s+1,s+1+n);
    for(int i=1;i<=n;i++)
       

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected ')' before 'if'
   16 |         mx=max(mx if(vis[s[i]]==mx)
      |               ~  ^~~
      |                  )
a.cc:21:2: error: expected primary-expression before ',' token
   21 | },vis[s[i]]);
      |  ^
a.cc:21:9: error: 'i' was not declared in this scope
   21 | },vis[s[i]]);
      |         ^
a.cc: At global scope:
a.cc:23:9: error: expected constructor, destructor, or type conversion before '(' token
   23 |     sort(s+1,s+1+n);
      |         ^
a.cc:24:5: error: expected unqualified-id before 'for'
   24 |     for(int i=1;i<=n;i++)
      |     ^~~
a.cc:24:17: error: 'i' does not name a type
   24 |     for(int i=1;i<=n;i++)
      |                 ^
a.cc:24:22: error: 'i' does not name a type
   24 |     for(int i=1;i<=n;i++)
      |                      ^
Language: C++

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

typedef long long ll;
const int N=2e5+5;
map<string,int>vis;
int n;
string s[N];
int main()
{
    scanf("%d",&n);
    
    for(int i=1;i<=n;i++)
    {
        cin>>s[i];vis[s[i]]++;
        
    }
    sort(s+1,s+1+n);
    for(int i=1;i<=n;i++)
        if(vis[s[i]]==mx)
    {
        cout<<s[i]<<endl;
        vis[s[i]]=0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:23: error: 'mx' was not declared in this scope
   20 |         if(vis[s[i]]==mx)
      |                       ^~
Language: C++


        cout<<s[t n; scanf("%d", &n); int ans = 0;
    for(int i = 1; i <= n; i ++) {
        cin >> s[i];
   endl;
        #include<or(int i=1;i<=n;i++)
        if(vis[s[i]]==mx)
    {bits/stdc++.h>
using namespace std;
h>
usi
    sort(s+1,s+1+n);
    f     ans = max(ans, ++ Map[s[i]]);
    }
    for(int i = 1; i <= n; i ++) {
        if(Map[s[i]] == ans) {
            Map[s[i]] = 0;
            vec.pb(s[i]);
        }
    }
    sort(vec2e5+5;.begin(), vec.end());
    fo0;
} 
typedef long long ll;
const int N=
map<string,int>vis; : vec) printf("%s\n", s.c_str());
    return  n;
string s[N];
int main()
{
    scanf("%d",&n);
    int
intr
vector<string>>>s[i];vis[s[i]]++;
        mx=max(mx,vis[s[i]]);
    }i]<< vec;
map<string, int> Map;
int main() {
    imespace std;

string s[200010];nin(auto s mx=0;
    for(int i=1;i<=n;i++)
    {
        cinvis[s[i]]=0;
    }
}
#ng naclude <bits/stdc++.

Compiler output:
a.cc:6:38: error: missing terminating > character
    6 |         #include<or(int i=1;i<=n;i++)
      |                                      ^
a.cc:6:17: fatal error: or(int i=1;i<=n;i++): No such file or directory
    6 |         #include<or(int i=1;i<=n;i++)
      |                 ^
compilation terminated.
Language: C++

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

string s[200010];
vector<string> vec;
map<string
    }
    sort(vec.begin(), vec.end());
    for(auto s : vec) printf("%s\n", s.c_str());
    return 0;
} 

Compiler output:
a.cc:6:5: error: wrong number of template arguments (1, should be at least 2)
    6 | map<string
      |     ^~~~~~
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:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:7:5: error: expected unqualified-id before '}' token
    7 |     }
      |     ^
a.cc:7:5: error: expected declaration before '}' token
a.cc:8:9: error: expected constructor, destructor, or type conversion before '(' token
    8 |     sort(vec.begin(), vec.end());
      |         ^
a.cc:9:5: error: expected unqualified-id before 'for'
    9 |     for(auto s : vec) printf("%s\n", s.c_str());
      |     ^~~
a.cc:10:5: error: expected unqualified-id before 'return'
   10 |     return 0;
      |     ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

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

string s[200010];
vector<string> vec;
map<string, int> Map;
int main() {
    int n; scanf("%d", &n); int ans = 0;
    for(int i = 1; i <= n; i ++) {
        cin >> s[i];
        ans = max(ans, ++ Map[s[i]]);
    }
    for(int i = 1; i <= n; i ++) {
        if(Map[s[i]] == ans) {
            Map[s[i]] = 0;
            vec.pb(s[i]);
        }
    }
    sort(vec.begin(), vec.end());
    
    return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pb'
   16 |             vec.pb(s[i]);
      |                 ^~
Language: C++

#include <iostream>
#include <map>
#include <string>
#define MOD 1000000007
using namespace std;

typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)

long long modinv(long long a, long long m=MOD) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m; 
    if (u < 0) u += m;
    return u;
    /*MODの割り算の際に
    a/＝b;
    を
    a *= modinv(b,MOD);
    とする。
        */
}

int N;
#define MAXN 200001
string S[MAXN];
int main(){
    cin >> N;
    rep(i,N)cin >> S[i];
    map<string,int>M;
    int maxn = 0;
    rep(i,N){
        auto itr = M.find(S[i]);
        if(itr == M.end()){
            M[S[i]] = 1;
            if(maxn < M[S[i]])maxn = M[S[i]];
        }else{
            M[S[i]]++;
            if(maxn < M[S[i]])maxn = M[S[i]];
        }
    }
    string A[MAXN];
    int count =0;
    rep(i,N){
        if(M[S[i]]==maxn){
            A[count] = S[i];
            count++;
        }
    }

    sort(A,A+count);
    for(int i=0;i<count;i+=maxn){
        cout << A[i] << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   55 |     sort(A,A+count);
      |     ^~~~
      |     short
Language: C++

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

int main(){
    int N;
    cin >> N;
    map<string,int> mp;
    for(int i=0;i<N;i++){
        string a;
        cin >> a;
        map[a]++;
    }
    int mx=0;
    auto itr = mp.begin();
    for(auto i = mp.begin(); i!= mp.end();i++){
        mx = max(mx,i.second);
    }
    for(auto i = mp.begin();i!=mp.end();i++){
        if(i.second == mx){
            cout << i.first << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: conflicting declaration 'auto a'
   11 |         map[a]++;
      |             ^
a.cc:9:16: note: previous declaration as 'std::string a'
    9 |         string a;
      |                ^
a.cc:11:15: error: expected initializer before '++' token
   11 |         map[a]++;
      |               ^~
a.cc:16:23: error: 'struct std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >' has no member named 'second'
   16 |         mx = max(mx,i.second);
      |                       ^~~~~~
a.cc:19:14: error: 'struct std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >' has no member named 'second'
   19 |         if(i.second == mx){
      |              ^~~~~~
a.cc:20:23: error: 'struct std::_Rb_tree_iterator<std::pair<const std::__cxx11::basic_string<char>, int> >' has no member named 'first'
   20 |             cout << i.first << endl;
      |                       ^~~~~
Language: C++

def main():
    n = int(input())
    dic = {}
    mx = 0
    for i in range(n):
        s = input()
        if s in dic:
            dic[s] += 1
        else:
            dic[s] = 1
        mx = max(mx,dic[s])
    l = []
    for k,v in dic.items():
        if v == mx:
            l.append(k)
    l.sort()
    for i in range(len(l)):
        print(l[i])


if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
a.cc:4:5: error: 'mx' does not name a type
    4 |     mx = 0
      |     ^~
Language: C++

n = int(input())
l = dict()
for i in range(n):
    s = input()
    if s not in l:
        l[s]=1
    else:
        l[s]+=1
l1 = []
for i in l:
    l1.append((l[i],i))
l1.sort()
l1 = l1[::-1]
p=0
#print(l1)
l2 = []
l2.append(l1[0][1])
for i in range(len(l1)-1):
    if l1[i][0]==l1[i+1][0]:
        l2.append(l1[i+1][1])
        p=i
    else:
        break
l2.sort()

for i in l2:
    print(i)

Compiler output:
a.cc:15:2: error: invalid preprocessing directive #print
   15 | #print(l1)
      |  ^~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>

#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
using p = pair<int, int>;

    int main(){
        int n;
        std::cin >> n;
        std::map<std::string, std::int> mp;
        rep(i, n){
            string s;
            std::cin >> s;
            mp[s]++;
        }
        int mx = 0;
        for(auto p : mp) mx = max(mx, p.second);
        for(auto p : mp) {
            if (p.second != mx) continue;
            std::cout << p.first << "\n";/* code */
        }
        return 0;
    }
    


Compiler output:
a.cc: In function 'int main()':
a.cc:11:39: error: template argument 2 is invalid
   11 |         std::map<std::string, std::int> mp;
      |                                       ^
a.cc:11:39: error: template argument 4 is invalid
a.cc:15:15: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   15 |             mp[s]++;
      |               ^
a.cc:18:22: error: 'begin' was not declared in this scope
   18 |         for(auto p : mp) mx = max(mx, p.second);
      |                      ^~
a.cc:18:22: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:18:22: error: 'end' was not declared in this scope
   18 |         for(auto p : mp) mx = max(mx, p.second);
      |                      ^~
a.cc:18:22: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
a.cc:19:22: error: 'begin' was not declared in this scope
   19 |         for(auto p : mp) {
      |                      ^~
a.cc:19:22: note: suggested alternatives:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:19:22: error: 'end' was not declared in this scope
   19 |         for(auto p : mp) {
      |                      ^~
a.cc:19:22: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C

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

int Amax(int *p,int size){
   int _max = 0;
   for(int i = 0;i < size;i++)
      if(p[i] > _max)_max = p[i];
   return _max;
}

int com_asc(const void * n1,const void * n2){
   if(*(int*)n1 < *(int*)n2)return 1;
   else if(*(int*)n1 > *(int*)n2)return -1;
   else return 0;
}

int main(){
   int n;scanf("%d",&n);
   char paper[200000][11];for(int i = 0;i < n;i++)scanf("%s",paper[i]);
   char tmp[11];
   int count[200000] ={0};
   int pointer;
   qsort(paper,n,(sizeof(char))*11,com_asc);
   pointer = 0;
   for(int i = 0;i < n-1;i++){
      if (!(strcmp(paper[i],paper[i+1]))){
         count[pointer]++;
      }else {
         pointer = i+1;
      }
   }
   /*for(int i = 0;i < n;i++){
      printf("%d\n",count[i]);
      printf("%s\n",paper[i]);
   }/*

   int x = Amax(count,n);
   for(int i = n-1;i >= 0;i--){
      if(count[i] == x)printf("%s\n",paper[i]);
   }
}


Compiler output:
main.c: In function 'main':
main.c:33:4: error: unterminated comment
   33 |    /*for(int i = 0;i < n;i++){
      |    ^
main.c:32:4: error: expected declaration or statement at end of input
   32 |    }
      |    ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

int main() {
    boost();
    int n;
    cin >> n;
    map <string, int> mp;
    vector <string> v;
    int maxi = 0;
    for (int i = 0; i < n; ++ i) {
        string str;
        cin >> str;
        if (mp[str] == 0) v.push_back(str);
        mp[str] ++;
        maxi = max(maxi, mp[str]);
    }
    for (int i = 0; i < v.size(); ++ i) {
        if (mp[v[i]] == maxi) ans.push_back(v[i]);
    }
    vector <string> ans;
    sort(ans.begin(), ans.end());
    for (int i = 0; i < ans.size(); ++ i) cout << ans[i] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:31: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |         if (mp[v[i]] == maxi) ans.push_back(v[i]);
      |                               ^~~
      |                               abs
Language: C++

n = parse(Int, readline())
v = parse.(Int, split(readline(), ' '))

d = Dict()
for i in v
  d[i] = get(d, i, 0) + 1
  if d[i] == 2
    println("NO")
    exit(0)
  end
end
println("YES")



Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = parse(Int, readline())
      | ^