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

int main(void){
   int i, sum[1000], a, key, MAX;
   for(i = 0; i < 100; i++){
      sum[i] = 0;
   }
   while(scanf("%d", &a) != EOF){
      sum[a - 1]++;
   }
   MAX = sum[0];
   key = 1;
   for(i = 0; i < 100; i++){
      if(sum[i] > MAX){
         MAX = sum[i];
      }
   }
   for(i = 0; i < 100; i++){
      if(sum[i] == MAX){
         printf("%d", i);
      }
   }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |    while(scanf("%d", &a) != EOF){
      |          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:6:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |    while(scanf("%d", &a) != EOF){
      |          ^~~~~
main.c:6:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:29: error: 'EOF' undeclared (first use in this function)
    6 |    while(scanf("%d", &a) != EOF){
      |                             ^~~
main.c:6:29: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:6:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:10: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |          printf("%d", i);
      |          ^~~~~~
main.c:18:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:18:10: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:18:10: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<iostream>
using namespace std;
int main()
{
	int a[100+1]={0};
	int t;
	while(~scanf("%d",&t))
	a[t]++;
	int max=0;
	for(int i=0;i<101;i++)
	if(a[i]>max) max=a[i];
	for(int i=0;i<101;i++)
	if(a[i]==max) cout<<i<<endl;
} 


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

#include <iostream>

using namespace std;

int main()
{
    int cnt[100] = {0};
    int num;
    int max_v = 0;

    while(cin >> num)
    {
        cnt[num-1]++;
        max_v = max(max_v, cnt[num-1]);
    }
    for (int i=0; i<100; i++)
    {
        if (cnt[i] == max_v)
            cout << i+1 << endl;
    }

    return 0;
}



Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include "stdafx.h"


int main()
{
	int a[100] = { 0 }, i, max=0;
	while (scanf("%d", &i) != EOF) a[i - 1]++;
	for (i = 0; i < 100; i++)
		if (max < a[i]) max = a[i];
	for (i = 0; i < 100; i++)
		if (max == a[i]) prinf("%d\n", i + 1);
    return 0;
}




Compiler output:
main.c:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>


int main()
{
	int a[100] = { 0 }, i, max=0;
	while (scanf("%d", &i) != EOF) a[i - 1]++;
	for (i = 0; i < 100; i++)
		if (max < a[i]) max = a[i];
	for (i = 0; i < 100; i++)
		if (max == a[i]) prinf("%d\n", i + 1);
    return 0;
}




Compiler output:
main.c: In function 'main':
main.c:11:34: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   11 |                 if (max == a[i]) prinf("%d\n", i + 1);
      |                                  ^~~~~
      |                                  printf
Language: C

a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:5: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |     ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:37: error: implicit declaration of function 'fmax' [-Wimplicit-function-declaration]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                                     ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'fmax'
  +++ |+#include <math.h>
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
main.c:1:37: warning: incompatible implicit declaration of built-in function 'fmax' [-Wbuiltin-declaration-mismatch]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                                     ^~~~
main.c:1:37: note: include '<math.h>' or provide a declaration of 'fmax'
main.c:1:37: error: too few arguments to function 'fmax'
main.c:1:69: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                                                                     ^~~~~~
main.c:1:69: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:69: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:69: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:1: warning: array 'a' assumed to have one element
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=fmax(++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      | ^
Language: C

a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:5: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |     ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:37: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                                     ^~~
main.c:1:70: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      |                                                                      ^~~~~~
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:70: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:70: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: At top level:
main.c:1:1: warning: array 'a' assumed to have one element
    1 | a[],i;main(m){for(;~scanf("%d",a)?m=max(m,++a[*a]):i++>99?!i:m-a[i]||printf("%d\n",i););}
      | ^
Language: C

#include <stdio.h>
  int main(){
   int x[101]={};
int y[101]={};
    int n,i,j;
while(scanf("%d",&n) != EOF){
x[n]++;
}
for(i=0;i<101;i++){
for(j=0;j<101 && j != i;j++){
if(x[i]<x[j]){
y[i]++;
}
}
for(i=0;i<101;i++){
if(y[i]==0)
printf("%d\n",i);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include <stdio.h>
  int main(){
   int x[101]={};
int y[101]={};
    int n,i,j;
while(scanf("%d",&n) != EOF){
x[n]++;
}
for(i=0;i<101;i++){
for(j=0;j<101;j++){
if(x[i]<x[j]){
y[i]++;
}
}
for(i=0;i<101;i++){
if(y[i]==0)
printf("%d\n",i);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

include<stdio.h>

int main()
{
	int a[101]={0},b[101]={-1};
	int i,j=0,inp,max=0;

	while(scanf("%d",&inp) != EOF)
	{
		if(inp<0 || inp>100)
			continue;
		a[inp]++;
	}

	for(i=0;i<101;i++)
	{
		if(max<a[i])
		{
			max=a[i];
		}
	}
	for(i=0;i<101;i++)
	{
		if(max==a[i])
		{
			printf("%d\n",i);
		}
	}
	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>
int main(){
int a[100],g,y,i=0;
a[100]={0};
g=0;
while(scanf("%d",&i)!=EOF){
a[i]++;
}
for(i=0;i<100;i++){
if(a[i]>g){
g=a[i];
y=i;
}
}
printf("%d\n",y);
return　(0);
}

Compiler output:
main.c: In function 'main':
main.c:4:8: error: expected expression before '{' token
    4 | a[100]={0};
      |        ^
main.c:16:7: error: stray '\343' in program
   16 | return<U+3000>(0);
      |       ^~~~~~~~
Language: C

#include<stdio.h>
int main(void)
{
 int x[101]={0},int y[101]={0};
 int i=0,max;
 while(scanf("%d",&x[i])!=EOF)
 {
   y[x[i]] ++;
   i ++;
 }
 max = y[0];
 for(i=1; i<101; i++){
 if(max < y[i]) max = y[i];
 }    //maxは、数字のカウントの最大。つまり、何回カウントしたか。
 for(i=0; i<101; i++){
     if(max == y[i]) //カウント数が等しかったら、
     {
      printf("%d\n",i); //添字を出力する。
     }
 }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:17: error: expected identifier or '(' before 'int'
    4 |  int x[101]={0},int y[101]={0};
      |                 ^~~
main.c:8:4: error: 'y' undeclared (first use in this function)
    8 |    y[x[i]] ++;
      |    ^
main.c:8:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
int num[1000]={0};
for(int i=1;i<=n;i++)
{
int a;
cin>>a;
num[a]++;
}
int ans=0,now=0;
for(int i=1;i<=105;i++)
{
if(num[i]>ans)
{
ans=num[i];
now=i；
}
}
cout<<now<<endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'i\U0000ff1b' was not declared in this scope
   21 | now=i；
      |     ^~~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main(){
    vector<int>Times(101,0);
    int x;
    while(cin >> x){
      cin>>x;
      Times[x]+=1;
    }
    
    int ma =-1
    for(int x=1; x<=100; x++){
        if(ma<Times[x]) ma=Times[x]
    }
     
    for(int x=1; x<=100; x++){
        if(Times[x] == ma) cout << x << endl;
    } 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected ',' or ';' before 'for'
   15 |     for(int x=1; x<=100; x++){
      |     ^~~
a.cc:15:29: error: expected ';' before ')' token
   15 |     for(int x=1; x<=100; x++){
      |                             ^
      |                             ;
Language: C++

#include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
int main()
{
int a[100];
for(int i=0;i<100;i++)a[i]=0;
int n;
while(cin >> n){
a[n-1]++;
}
int ans=0;
for(int i=1;i<100;i++){
if(a[ans]<a[i])ans=i;
}
cout << i+1 << "\n";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'i' was not declared in this scope
   17 | cout << i+1 << "\n";
      |         ^
Language: C++

#include <algorithm>
#include <functional>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <climits>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
using namespace std;
typedef pair<int ,int > P;
typedef long long ll;

int ary[105];
int main() {
    int a;
    while(cin>>a) {
        ary[a]++;
    }
    int maxi = max_element(ary,ary+105);
    rep(i,105) {
        if(maxi==ary[i]) {
            cout<<i<<endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:27: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   40 |     int maxi = max_element(ary,ary+105);
      |                ~~~~~~~~~~~^~~~~~~~~~~~~
      |                           |
      |                           int*
Language: C++

#include <stdio.h>

int main()
{
	int n;
	int a[100+1];
	int max = 0;
	for(int i = 0; i < 101; i++){
		a[i] = 0;
	}
	while(scanf("%d",&n) != EOF){
		a[n]++;
	}
	for(int i = 0; i < 101; i++){
		if(max < a[i]){
			max = a[i];
		}
	}
	for(int i = 0; i < 101; i++){
		if(max == a[i]){
			printf("%d\n",i);
		}
	}
	Sleep(2000);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'Sleep' was not declared in this scope
   24 |         Sleep(2000);
      |         ^~~~~
Language: C++

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

int main()
{
	vector<int> Vec(100);
	int n;
	while(cin>>n){
		Vec[n]++;
	}
	int max_r = 0, ans;
	for(int i=0;i<100;i++){
		max_r = max( max_r, Vec[i]);
	}
	for(int i=0;i<100;i++){
		if(max_r == Vec[i]){
			ans = i;
		}
	}
	cout<<i<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: 'i' was not declared in this scope
   22 |         cout<<i<<endl;
      |               ^
Language: C++

#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <map>
#define INF 100000000
#define rep(i,a) for(int i=0;i<(a);i++)

using namespace std;
typedef long long ll;


int main(){
    queue<int> ans;
    int ma=-1;
    map<int,int> map;
    map.clear();
    int tmp;
    while(cin>>tmp){
        map[tmp]++;
    }
    rep(i,map.size()){
        if(ma<map[i])
        
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:5: error: expected primary-expression before '}' token
   29 |     }
      |     ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int hist[100];
  for(int i=0; i<100;i++) hist[i] = 0;
 
  int n;
  while(cin >> n) hist[n]++;
  
  int maxv = 0;
  for(int i=0;i<100;i++){
    if(ans[i] >  maxv) maxv = ans[i];
  }
  
  for(int i=0;i<100;i++){
    if(maxv == hist[i]) cout << i << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     if(ans[i] >  maxv) maxv = ans[i];
      |        ^~~
      |        abs
Language: C++

#include <iostream>
using namespace std;

int main(){
  int hist[100];
  for(int i=0; i<100;i++) hist[i] = 0;
 
  int n;
  while(cin >> n) hist[n]++;
  
  int maxv = 0;
  for(int i=0;i<100;i++){
    if(ans[i] >  maxv) maxv = hist[i];
  }
  
  for(int i=0;i<100;i++){
    if(maxv == hist[i]) cout << i << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     if(ans[i] >  maxv) maxv = hist[i];
      |        ^~~
      |        abs
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int sum[101],n,mx,cou;
int main(){
    while(cin>>n){
        sum[n]++;
    }
    for(int i=0;i<100;i++)mx=max(mx,sum[i]);
    for(int i=0;i<100;i++){
        if(mx==sum[i]){
            cout<<i<<endl;
    }
    cout<<endl;
return 0;
}

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

#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int sum[101],n,mx,cou;
int main(){
    while(cin>>n){
        sum[n]++;
    }
    for(int i=0;i<100;i++)mx=max(mx,sum[i]);
    for(int i=0;i<100;i++){
        if(mx==sum[i]){
            cout<<i<<endl;
    }
return 0;
}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int cnt[] = new int[100];
		
		while (input.hasNext()){
			int n = input.nextInt();
			cnt[--n]++;
		}
		
		int max = 0;
		for (int n : cnt){
			if (max < n){
				max = n;
			}
		}
		
		for (int i = 0; i < cnt.length; i++){
			if (cnt[i] == max){
				System.out.println(i + 1);
			}
		}
	}
}

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

#include <iostream>
//using namespace std;

#define N 100
#define MYSCAN scanf_s

int main(void){

	int i;
	int input, max = 0;
	int bucket[N + 1];

	// テゥツ?催・ツ按療」ツ?ョテ・ツ按敕ヲツ慊淌・ツ個?
	for (int i = 0; i < N + 1; i++){
		bucket[i] = 0;
	}

	// テ・ツ?・テ・ツ環崚」ツ?ォテ」ツ?療」ツ?淌」ツ?古」ツ?」テ」ツ?ヲテゥツ??ヲツャツ。テゥツ?催・ツ按療」ツつ津」ツつォテ」ツつヲテ」ツδウテ」ツδ暗」ツつ「テ」ツδε」ツδ?
	while (MYSCAN("%d", &input) != EOF){
		bucket[input]++;
	}

	// テ」ツつづ」ツ?」テ」ツ?ィテ」ツつづ・ツ、ツ堙」ツ?湘・ツ?コテ」ツ?淌・ツ崢榲ヲツ閉ーテ」ツつ津ヲツアツづ」ツつ?」ツつ?
	for (int i = 0; i < N + 1; i++){
		if (max < bucket[i]){
			max = bucket[i];
		}
	}

	// テ」ツ?敕」ツ?ョテ・ツ崢榲ヲツ閉ーテ」ツ??」ツ?妥・ツ?・テ・ツ環崚」ツ?陛」ツつ古」ツ?淌ヲツ閉ーテ・ツ?、テ」ツつ津・ツ?コテ・ツ環?
	for (int i = 0; i < N + 1; i++){
		if (max == bucket[i]){
			printf("%d\n", i);
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    5 | #define MYSCAN scanf_s
      |                ^~~~~~~
a.cc:19:16: note: in expansion of macro 'MYSCAN'
   19 |         while (MYSCAN("%d", &input) != EOF){
      |                ^~~~~~
Language: C++

#include<iostream>
#include<string.h>
#include<vector>
using namespace std;
int main()
{
    int a[101];
    memset(a,0,sizeof(a));
    vector<int>vec;
    int in;
    while(cin>>in){
        a[in]++;
    }
    int m=0;
    for(int i=0;i<101;i++){
        if(a[i]>m){
            vec.clear();
            vec.push_back(i);
        }
        if(a[i]==m){
            vec.push_back(i);
        }
    }
    sort(vec.begin(),vec.end());
    for(int i=0;i<vec.size();i++){
        cout<<vec[i]<<endl;
    }
    return 0;
}

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

#include<iostream>
using namespace std;

int main(){

int numbers[100] , x ,y;
y = max(numbers[x]);

while ( cin >> x ){
numbers[x - 1]++;
}

while ( y != 1 ){
cout << numbers[x] << endl;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: no matching function for call to 'max(int&)'
    7 | y = max(numbers[x]);
      |     ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<iostream>
using namespace std;
 
int main(){

int numbers[100] , x ,y, i;

while ( cin >> x ){
numbers[x - 1]++;
}

y = 0;
for( i = 0 ; i < 100 ; i++ ){
??????if (numbers[i] > y){
      y = numbers[i];
    }
}

for ( i = 0 ; i < 100 ; i++ ) {
     if ( y == numbers[i] ){
       cout << i + 1 << endl;
      }
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:1: error: expected primary-expression before '?' token
   14 | ??????if (numbers[i] > y){
      | ^
a.cc:14:2: error: expected primary-expression before '?' token
   14 | ??????if (numbers[i] > y){
      |  ^
a.cc:14:3: error: expected primary-expression before '?' token
   14 | ??????if (numbers[i] > y){
      |   ^
a.cc:14:4: error: expected primary-expression before '?' token
   14 | ??????if (numbers[i] > y){
      |    ^
a.cc:14:5: error: expected primary-expression before '?' token
   14 | ??????if (numbers[i] > y){
      |     ^
a.cc:14:6: error: expected primary-expression before '?' token
   14 | ??????if (numbers[i] > y){
      |      ^
a.cc:14:7: error: expected primary-expression before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
a.cc:14:7: error: expected ':' before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
      |       :
a.cc:14:7: error: expected primary-expression before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
a.cc:14:7: error: expected ':' before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
      |       :
a.cc:14:7: error: expected primary-expression before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
a.cc:14:7: error: expected ':' before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
      |       :
a.cc:14:7: error: expected primary-expression before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
a.cc:14:7: error: expected ':' before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
      |       :
a.cc:14:7: error: expected primary-expression before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
a.cc:14:7: error: expected ':' before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
      |       :
a.cc:14:7: error: expected primary-expression before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
a.cc:14:7: error: expected ':' before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
      |       :
a.cc:14:7: error: expected primary-expression before 'if'
   14 | ??????if (numbers[i] > y){
      |       ^~
Language: C++

#include <iostream>
#include<cmath>

using namespace std;

void Solution()
{
    int n;
    
    int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
    
    while(cin>>n)
    {
        a[n]++; //after input some value, array's value can be added by 1 (0 -> 1), repeat this part.
    }
    
    int times = 0; // save the data in here about most frequently times
    
    for(int i = 0; i < 101; i++) // the data is less than 100
    {
        if(a[i] > times) //check the  a[] value for ensuring the mode value
        {
            times = a[i]; //repeat this part, at the last, can find mode value
        }
    }
    
    for(int i = 0; i < 101; i++) //output mode value
    {
        if(a[i] == times)
        {
            cout<<i<<endl;
        }
    }
}

int main()
{
    Solution();
    return 0;
}

Compiler output:
a.cc:10:22: error: extended character 　 is not valid in an identifier
   10 |     int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
      |                      ^
a.cc: In function 'void Solution()':
a.cc:10:22: error: '\U00003000' was not declared in this scope
   10 |     int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
      |                      ^~
Language: C++

#include <iostream>
#include<cmath>

using namespace std;

void Solution()
{
    int n;
    
    int times = 0; // save the data in here about most frequently times
    
    int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
    
    while(cin>>n)
    {
        a[n]++; //after input some value, array's value can be added by 1 (0 -> 1), repeat this part.
    }
    
    
    for(int i = 0; i < 101; i++) // the data is less than 100
    {
        if(a[i] > times) //check the  a[] value for ensuring the mode value
        {
            times = a[i]; //repeat this part, at the last, can find mode value
        }
    }
    
    for(int i = 0; i < 101; i++) //output mode value
    {
        if(a[i] == times)
        {
            cout<<i<<endl;
        }
    }
}

int main()
{
    Solution();
    return 0;
}

Compiler output:
a.cc:12:22: error: extended character 　 is not valid in an identifier
   12 |     int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
      |                      ^
a.cc: In function 'void Solution()':
a.cc:12:22: error: '\U00003000' was not declared in this scope
   12 |     int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
      |                      ^~
Language: C++

#include <iostream>
#include<cmath>

using namespace std;

void Solution()
{
    int n;
    
    int times = 0; // save the data in here about most frequently times
    
    int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
    
    while(cin>>n)
    {
        a[n]++; //after input some value, array's value can be added by 1 (0 -> 1), repeat this part.
    }
    
    
    for(int i = 0; i < 101; i++) // the data is less than 100
    {
        if(a[i] > times) //check the  a[] value for ensuring the mode value
        {
            times = a[i]; //repeat this part, at the last, can find mode value
        }
    }
    
    for(int i = 0; i < 101; i++) //output mode value
    {
        if(a[i] == times)
        {
            cout<<i<<endl;
        }
    }
    return;
}

int main()
{
    Solution();
    return 0;
}

Compiler output:
a.cc:12:22: error: extended character 　 is not valid in an identifier
   12 |     int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
      |                      ^
a.cc: In function 'void Solution()':
a.cc:12:22: error: '\U00003000' was not declared in this scope
   12 |     int a[101] = {0};　// the array which saves the mode value, at the beginning is all "0"
      |                      ^~
Language: C++

#include <cstdio>
#include <vector>

using namespace std;

int main(){
vector<int> data(101,0);
int v;
while(scanf("%d",&v)!=-1)data[v]++;
int mxvl=0;
vector<int> res;
for(int i=0;i<=100;++i;){
if(mxvl < data[i]){
mxvl = data[i];
res.clear();
}
if(mxvl == data[i])res.push_back(i);
}
for(int i=0;i<res.size();++i)printf("%d\n",res[i]);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: expected ')' before ';' token
   12 | for(int i=0;i<=100;++i;){
      |    ~                  ^
      |                       )
a.cc:12:24: error: expected primary-expression before ')' token
   12 | for(int i=0;i<=100;++i;){
      |                        ^
Language: C++

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

typedef vector<int> VI;
#define REP(i,s,t) for(int i=(s);i<(t);i++)

int main() {
    int i;
    map<int, int> count;
    while (cin >> i){
        map<int, int>::iterator it = count.find(i);
        if (it!=count.end()){
            count[i] += 1;
        } else {
            count[i] = 1;
        }
    }
    int mode = 0;
    VI m;
    for (auto it = count.cbegin(); it != count.cend(); ++it){
        if (mode < it->second){
            mode = it->second;
            m.clear();
            m.push_back(it->first);
        }else if (mode == it->second){
            m.push_back(it->first);
        }

    }
    std::sort(m.begin(), m.end());
    for (int num:m){
        cout << num << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:10: error: 'sort' is not a member of 'std'; did you mean 'sqrt'?
   34 |     std::sort(m.begin(), m.end());
      |          ^~~~
      |          sqrt
Language: C++

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


using namespace std;
#define LENGTH 100

int main(){
  
  vector<int> Digit(LENGTH, 0);
  
  
  int tmp;
  int cnt=0;
  while(cin >> tmp){
    cnt++;
    Digit[tmp]++;
  }
  int max = 0;
  vector<int> maxDigits;
  for(int i=0;i<cnt;i++){
    if(Digit[i]>max){
      //      vector<int>().swap(maxDigits); //
      maxDigits.clear();
      maxDigits.push_back(i);
      max = Digit[i];
      //      cout << i << ">:" << endl; 
    }else{
      if(Digit[i]==max){
	maxDigits.push_back(i);
	//	cout << i << "==:" << endl;
      }
    }
  }

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

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

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

#include <iostream>
#include <math.h>

using namespace std;

int main(){
	int a[101] = {0};
	int b;
	int MAX = 0;

	while(cin >> b){
		a[b]++;
	}
	for(int j=1; j<101; i++){
		MAX = max(MAX, a[j]);
	}
	for(int m=1; m<101; m++){
		if(MAX == a[m]){
			cout << m << endl;
 		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: 'i' was not declared in this scope
   14 |         for(int j=1; j<101; i++){
      |                             ^
Language: C++

#define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 50//00
#define MIN -100001
#define _MAX 100
#define g 9.8
#define d 4.9
int main(void)
{
	int a[_MAX] = { 0 }, x, max = 0;
	while (scanf_s("%d", &x) != EOF) {
		++a[x - 1];
		if (a[x - 1] > max) max = a[x - 1];
	}
	for (int i = 0; i < _MAX; ++i) {
		if (a[i] == max) {
			printf("%d\n", i + 1);
		}
	}s
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: 's' was not declared in this scope
   24 |         }s
      |          ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int i,a[100];
  while(cin >> i) a[i-1]++;
  int m = max(a[100]);
  while(int j = 0; j <100; j++){
    if(a[j] == m) cout << j + 1 << "\n";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no matching function for call to 'max(int&)'
    7 |   int m = max(a[100]);
      |           ~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
a.cc:8:18: error: expected ')' before ';' token
    8 |   while(int j = 0; j <100; j++){
      |        ~         ^
      |                  )
a.cc:8:20: error: 'j' was not declared in this scope
    8 |   while(int j = 0; j <100; j++){
      |                    ^
Language: C++

#include<iostream>
#include<algorithm>
#define N 101
using namespace std;

int main(){

  int i, m, a[N] = {};
  while(cin >> i)
    a[i]++;

  for(int j = 1; j < N; j++) 
    m = max(m,a[j]);

  for(int k = 1; k < N; k++)
    if(a[k] == max) 
      cout << k << "\n";
  
}

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

#include <cstdio>
#include <iostream>
#include <algorithm>

using namespace std;

int main() {

	int a, max1=0,b[101] = {};

	while (CI a) {
		b[a]++;
		max1 = max(b[a], max1);
	}

	for (int i = 0; i < 101; i++) {
		if (b[i] == max1)CO i EN;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'CI' was not declared in this scope
   11 |         while (CI a) {
      |                ^~
a.cc:11:18: error: expected ')' before 'a'
   11 |         while (CI a) {
      |               ~  ^~
      |                  )
a.cc:11:20: error: expected ';' before ')' token
   11 |         while (CI a) {
      |                    ^
      |                    ;
a.cc:17:34: error: 'CO' was not declared in this scope
   17 |                 if (b[i] == max1)CO i EN;
      |                                  ^~
Language: C++

int main()
{
	int i;
	int seed,max = 0;
	int data[100] = { 0 };
	int maxnum[100];
	while ((scanf("%d", &seed)) != EOF)
	{
		data[seed] += 1;
	}
	for (i = 0; i < 100; i++)
	{
		if (data[i] > max) max = data[i];
	}
	for (i = 0; i < 100; i++)
	{
		if (data[i] == max) printf("%d\n", i + 1);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'scanf' was not declared in this scope
    7 |         while ((scanf("%d", &seed)) != EOF)
      |                 ^~~~~
a.cc:7:40: error: 'EOF' was not declared in this scope
    7 |         while ((scanf("%d", &seed)) != EOF)
      |                                        ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
a.cc:17:37: error: 'printf' was not declared in this scope
   17 |                 if (data[i] == max) printf("%d\n", i + 1);
      |                                     ^~~~~~
a.cc:17:37: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <stdio.h>

int main()
{
	int i;
	int seed,max = 0;
	int data[100] = { 0 };
	int maxnum[100];
	while ((scanf_s("%d", &seed)) != EOF)
	{
		data[seed-1] += 1;
	}
	for (i = 0; i < 100; i++)
	{
		if (data[i] > max) max = data[i];
	}
	for (i = 0; i < 100; i++)
	{
		if (data[i] == max) printf("%d\n", i + 1);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    9 |         while ((scanf_s("%d", &seed)) != EOF)
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#define REP(i, n) for(int i = 0;i < n;i++)
#define ll long long
#define INF 114514
using namespace std;




int main(){
	int a[100000] = { 0 }, n, max = 0, f = 0;
	//vector<int>v(10000);
	while (cin >> n) {
		a[n]++;
	}
	for (int i = 1; i <= 100; i++) {
		if (a[n] < max) max = a[n];
	}
	for (int i = 1; i <= 100; i++) {
		if (a[i] == max) {
			v[f] = i;
			f++;
		}
	}
	for (int i = 1; i <= 100; i++) {
		cout << i << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:25: error: 'v' was not declared in this scope
   35 |                         v[f] = i;
      |                         ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[10000]={0};
int s,sai,ans=0,c=0;
while(cin>>s){
a[s]++;
c++;
}
for(i=0;i<c;i++){
if(a[i]>ans){
ans=a[i];
sai=i;
}
cout<<sai<<endl<<ans<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'i' was not declared in this scope
   11 | for(i=0;i<c;i++){
      |     ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++


#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[10000]={0};
int s,sai,ans=0,c=0,i;
while(cin>>s){
a[s]++;
c++;
}
for(i=0;i<c;i++){
if(a[i]>ans){
ans=a[i];
sai=i;
}
cout<<sai<<endl<<ans<<endl;
return 0;
}

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

#include <iostream>

int main(){
	int a,c=0,t=0;
	int b[100],f[100],z[100];
	z[0]=0;
	for(int ds=0;ds<12;ds++){
	std::cin>>a;
         c++;
	    b[c]=a;
	}
	for(int g=1;g<=100;g++){
		f[g]=0;
		z[g]=0;
	}
	for(int d=1;d<=c;d++){
			f[b[d]]++;
			}
	for(int g=1;g<=100;g++){
		
			if(f[g]>z[0]){
			
			z[0]=g;
				t=0;
			}else if(f[g]==z[0]){a
				t++;
				z[t]=g;
		}
	}
	for(int p=0;p<t;p++){
		std::cout<<z[p]<<std::endl;
	}
	return 0;
		}
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:25:47: error: expected ';' before 't'
   25 |                         }else if(f[g]==z[0]){a
      |                                               ^
      |                                               ;
   26 |                                 t++;
      |                                 ~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,n;
  int my_array[101]={};
  
  
  while(cin>>a){
    my_array[a]++;
  }
  int b=0;
  for(n=1;n<=100;n++){
    if(b>my_array[n])
      b=my_array[n];
  }
  for(int c=0;c<=100;c++){
    if(b==my_array[c])
      cout<<c<<endl;
  }


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

#include<iostream>
#include<vector>
#include <iostream>

using namespace std;

struct DATA{
  int number;
  int count;
};

void PushWordCount(int, vector<DATA>&);
bool Compare(const int&, const int&);

int main(){
  int i, n, max = 0;
  vector<int> Max;
  vector<DATA> data;

  while(cin >> n)
    PushWordCount(n, data);

  for(i=0; i<data.size(); ++i){
    if(data[i].count == max){
      Max.push_back(data[i].number);
    }else if(data[i].count > max){
      Max.clear();
      Max.push_back(data[i].number);
      max = data[i].count;
    }
  }
  sort(Max.begin(), Max.end());

  for(i=0; i<Max.size(); ++i)
    cout << Max[i] << endl;

  return 0;
}

void PushWordCount(int n, vector<DATA>& data){
  int isFound = 0;
  DATA newdata;
  vector<DATA>::iterator iter = data.begin();

  while(iter != data.end()){
    if(iter->number == n){
      isFound = 1;
      ++iter->count;
      break;
    }
    ++iter;
  }
  if(isFound == 0){
    newdata.number = n;
    newdata.count = 1;
    data.push_back(newdata);
  }
}

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

#include<iostream>
using namespace std;

int main(){
    int n;
    int nn[100];
    int max = 0;
    for(int i=0;i<100;i++){
        nn[i] = 0;
    }
    while(cin >> n){
        nn[n-1] += 1
        if(nn[n-1] > max){
            max = nn[n-1];
        }
    }
    for(int i=0;i<100;i++){
        if(nn[i] == max){
            cout << i+1 << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before 'if'
   12 |         nn[n-1] += 1
      |                     ^
      |                     ;
   13 |         if(nn[n-1] > max){
      |         ~~
Language: C++

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

int main(){
int i,n;
int max,a[100]={0};
while(scanf("%d",&n)!=EOF){
a[n]++;
}
max=0;
for(i=0;i<100;i++){
if(max<a[i]){
max=a[i];
}
for(i=0;i<100;i++){
if(a[i]==max){
printf("%d\n",i);
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:13:19: note: to match this '{'
   13 | for(i=0;i<100;i++){
      |                   ^
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#inlcude <stdio.h>

int main(){
    int d[100];
    int maximize[100];

    int buf;
    while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;

    int buff = 0;
    for( int i = 0;i < 100;i++ ){
        if( d[i] > buff ) buff = d[i];
    }

    for( int i = 0;i < 100;i++ ){
        if( d[i] >= buff ) printf( "%d\n",i+1 );
    }
    return 0;
}
        

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude <stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:12: error: 'scanf' was not declared in this scope
    8 |     while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;
      |            ^~~~~
a.cc:8:34: error: 'EOF' was not declared in this scope
    8 |     while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;
      |                                  ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #inlcude <stdio.h>
a.cc:16:28: error: 'printf' was not declared in this scope
   16 |         if( d[i] >= buff ) printf( "%d\n",i+1 );
      |                            ^~~~~~
a.cc:16:28: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

int main(){
    int d[100];
    int maximize[100];

    int buf;
    while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;

    int buff = 0;
    for( int i = 0;i < 100;i++ ){
        if( d[i] > buff ) buff = d[i];
    }

    for( int i = 0;i < 100;i++ ){
        if( d[i] >= buff ) printf( "%d\n",i+1 );
    }
    return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude <stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:12: error: 'scanf' was not declared in this scope
    9 |     while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;
      |            ^~~~~
a.cc:9:34: error: 'EOF' was not declared in this scope
    9 |     while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;
      |                                  ^~~
a.cc:3:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <stdlib.h>
  +++ |+#include <cstdio>
    3 | 
a.cc:17:28: error: 'printf' was not declared in this scope
   17 |         if( d[i] >= buff ) printf( "%d\n",i+1 );
      |                            ^~~~~~
a.cc:17:28: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

import java.util.Scanner;

public class J0029 {
	public static void main(String[] args) {
		int i=0;
		String[] s = new String[1000];
		int[] count = new int[1000];
		Scanner sc = new Scanner(System.in);
		
		while( sc.hasNext() ){
			boolean flag=true;
			String tmp = sc.next();
			
			if(i==0){
				s[i]=tmp;
				count[i]=1;
				i++;
				continue;
			}
			
			for(int j=0; j<i; j++) {
				if(s[j].equals(tmp)){
					count[j]++;
					flag=false;
					break;
				}
			}
			
			if(flag){
				s[i]=tmp;
				count[i]=1;
				i++;
			}
		}
		
		int max = count[0];
		int length = s[0].length();
		String str = s[0];
		String str2 = s[0];
		for(int j=0; j<i; j++) {
			//System.out.println("count[" + j + "] = "+count[j]);
			//System.out.println("s[" + j + "] = "+s[j]);
		
		
			if(max<count[j]) {
				max = count[j];
				str = s[j];
			}
			if(s[j].length()>length){
				length = s[j].length();
				str2 = s[j];
			}
		}
		
		System.out.print(str + " " + str2);
			
		
	}
}

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

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

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String[] words=br.readLine().split(" ");
Hashmap<String,Integer> map=new Hashmap<String,Integer>();
int occured=0;
String occuredword="";
int maxlength=0;
String maxword="";
for(String word:words){
if(!map.containskey(word)){
map.put(word,1);
}
else{
map.put(word,map.get(word)+1)
}
if(map.get(word)>occured){
ocuured=map.get(word);
occueredword=word;
}
if(word.length()>maxlength){
maxlength=word.length();
maxword=word;
}
}
}

Compiler output:
Main.java:18: error: ';' expected
map.put(word,map.get(word)+1)
                             ^
Main.java:29: error: reached end of file while parsing
}
 ^
2 errors
Language: Java

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

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String[] words=br.readLine().split(" ");
Hashmap<String,Integer> map=new Hashmap<String,Integer>();
int occured=0;
String occuredword="";
int maxlength=0;
String maxword="";
for(String word:words){
if(!map.containskey(word)){
map.put(word,1);
}
else{
map.put(word,map.get(word)+1);
}
if(map.get(word)>occured){
ocuured=map.get(word);
occueredword=word;
}
if(word.length()>maxlength){
maxlength=word.length();
maxword=word;
}
}
}
}

Compiler output:
Main.java:8: error: cannot find symbol
Hashmap<String,Integer> map=new Hashmap<String,Integer>();
^
  symbol:   class Hashmap
  location: class Main
Main.java:8: error: cannot find symbol
Hashmap<String,Integer> map=new Hashmap<String,Integer>();
                                ^
  symbol:   class Hashmap
  location: class Main
Main.java:21: error: cannot find symbol
ocuured=map.get(word);
^
  symbol:   variable ocuured
  location: class Main
Main.java:22: error: cannot find symbol
occueredword=word;
^
  symbol:   variable occueredword
  location: class Main
4 errors