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

#include <stdio.h>

#define NUM 10

int main(void){
	int hills[NUM];
	int i;
	
	for(i = 0; i < NUM; i++){
		scanf("%d", &hills[i]);
	}
	
	bsort(hills, NUM);
	
	for(i = 0; i < 3; i++){
		printf("%d\n", hills[i]);
	}
	
	return 0;
}
*/

int main(void){
	int top1=0,top2=0,top3=0;
	int i;
	int input;
	
	for(i = 0; i < NUM; i++){
		scanf("%d", &input);
		
		if(top1 < input) {
			top2 = top1;
			top1 = input;
		}
		else if(top2 < input){
			top3 = top2;
			top2 = input;
		}
		else if(top3 < input){
			top3 = input;
		}
	}
		
	printf("%d\n", top1);
	printf("%d\n", top2);
	printf("%d\n", top3);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: implicit declaration of function 'bsort' [-Wimplicit-function-declaration]
   13 |         bsort(hills, NUM);
      |         ^~~~~
main.c: At top level:
main.c:21:2: error: expected identifier or '(' before '/' token
   21 | */
      |  ^
Language: C

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class Main {
	public static int main(String[] args) {

		int[] hillsHight = Arrays.stream(args).mapToInt(Integer::parseInt).toArray();

		List<Integer> hillsHightList = new ArrayList<>();
		for (int i = 0; i < hillsHight.length; i++) {
			hillsHightList.add(Integer.valueOf(hillsHight[i]));
		}

		Collections.sort(hillsHightList, Comparator.reverseOrder());

		System.out.println(hillsHightList.get(0));
		System.out.println(hillsHightList.get(1));
		System.out.println(hillsHightList.get(2));

		return 0;
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.ArrayList;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.ArrayList;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.util.Arrays;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.util.Arrays;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.util.Collections;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.util.Collections;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.util.Comparator;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.util.Comparator;
      |            ^
main.c:5:1: error: unknown type name 'import'
    5 | import java.util.List;
      | ^~~~~~
main.c:5:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 | import java.util.List;
      |            ^
main.c:7:1: error: unknown type name 'public'
    7 | public class Main {
      | ^~~~~~
main.c:7:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    7 | public class Main {
      |              ^~~~
Language: C

#include<stdio.h>

int main(void)
{
	int m[1000], a[100], key1, key2, i;
	for(i = 1; i <= 10; i++){
		scanf("%d", &m[i]);
	}
	a[1] = m[1];
	a[2] = m[2];
	a[3] = m[3];
	for(i = 1; i <= 10; i++){
		if(a[1] < m[i]){
			key1 = a[1];
			key2 = a[2];
			a[1] = m[i];
			a[2] = key;
			a[3] = key2;
		}
	}
	printf("%d\n%d\n%d\n",a[1], a[2], a[3]);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:32: error: 'key' undeclared (first use in this function); did you mean 'key2'?
   17 |                         a[2] = key;
      |                                ^~~
      |                                key2
main.c:17:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

void yomikomi(){
 int i,data;
 int max1=0,max2=0,max3=0;
 for(i=0; i<=9; i++){
     scanf("%d",&data);
     if(max1<=data){
        max3=max2;
        max2=max1
        max1=data;
      }
 }
 printf("%d\n",max1);
 printf("%d\n",max2);
 printf("%d\n",max3);
}

int main(void){

 yomikomi();

 return 0;
}

Compiler output:
main.c: In function 'yomikomi':
main.c:10:18: error: expected ';' before 'max1'
   10 |         max2=max1
      |                  ^
      |                  ;
   11 |         max1=data;
      |         ~~~~
Language: C

#include <stdio.h>
??
void yomikomi(){
??int i,data;
??int max1=0,max2=0,max3=0;
??for(i=0; i<=9; i++){
??????????scanf("%d",&data);
??????????if(max1<=data){
????????????????max3=max2;
????????????????max2=max1;
????????????????max1=data;
????????????}
??}
??printf("%d\n",max1);
??printf("%d\n",max2);
??printf("%d\n",max3);
}
??
int main(void){
??
??yomikomi();
??
??return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:18:1: error: expected identifier or '(' before '?' token
   18 | ??
      | ^
Language: C

#include <stdio.h>

void zikkou(void){
 int max1=0,max2=0,max3=0;
 int i,data;
 
 for(i=0; i<=9; i++){
     scanf("%d",&data);
     if(max1<=data){
	max3=max2;
	max2=max1;
	max1=data;
      }
 }
 printf("%d\n",max1);
 printf("%d\n",max2);
 printf("%d\n",max3);
}	



int main(void){
 zikkou();
 return o;
}

Compiler output:
main.c: In function 'main':
main.c:24:9: error: 'o' undeclared (first use in this function)
   24 |  return o;
      |         ^
main.c:24:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void)
{
	int tall[10];
	int a,b,c,i;
	a=0;
	b=0;
	c=0;
	for (i=1 ; i<=10 ; i++){
		scanf("%d",&tall[i]);
		if(a=<tall[i]){
			c=b;
			b=a;
			a=tall[i];
		}
		else if(b=<tall[i]){
			c=b;
			b=tall[i];
		}
		else if(c=<tall[i]){
			c=tall[i];
		}
	}
	printf("%d %d %d\n",a,b,c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:22: error: expected expression before '<' token
   11 |                 if(a=<tall[i]){
      |                      ^
main.c:16:27: error: expected expression before '<' token
   16 |                 else if(b=<tall[i]){
      |                           ^
main.c:20:27: error: expected expression before '<' token
   20 |                 else if(c=<tall[i]){
      |                           ^
Language: C

#include <stdio.h>
int main(void)
{
	int tall[10],a,b,c,i;
	a=0;
	b=0;
	c=0;
	for (i=1 ; i<=10 ; i++){
		scanf("%d",&tall[i]);
		if(a=<tall[i]){
			c=b;
			b=a;
			a=tall[i];
		}
		else if(b=<tall[i]){
			c=b;
			b=tall[i];
		}
		else if(c=<tall[i]){
			c=tall[i];
		}
	}
	printf("%d %d %d\n",a,b,c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:22: error: expected expression before '<' token
   10 |                 if(a=<tall[i]){
      |                      ^
main.c:15:27: error: expected expression before '<' token
   15 |                 else if(b=<tall[i]){
      |                           ^
main.c:19:27: error: expected expression before '<' token
   19 |                 else if(c=<tall[i]){
      |                           ^
Language: C

include<stdio.h>
int main(void){
  int a[10],i,max[3]={0,0,0};
  for(i=0;i<10;i++){
    scanf("%d",&a[i]);
    if(a[i]>max[0]){
      max[2] = max[1];
      max[1] = max[0];
      max[0] = a[i];
    }
    else if(max[0]>=a[i]&&a[i]>=max[1]){
      max[2] = max[1];
      max[1] = a[i];
    }
    else if(max[1]>=a[i]&&a[i]>=max[2]){
      max[2] = a[i];
    }
  }
  for(i=0;i<3;i++){
    printf("%d\n",max[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(void){

	int i, j, s[10], asd;

	for(i=1; i<=10; i++){
		scanf("%d",&s[i]);
	}gcc 
	for(i=1; i<=10; i++){
	for(j=1+i; j<=10; j++){
		if(s[j] > s[i]){
			asd = s[i];
			s[i] = s[j];
			s[j] = asd;
		}
	}
	}
	for(i=1; i<=3; i++){
		printf("%d\n",s[i]);
	}


return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:10: error: 'gcc' undeclared (first use in this function)
    9 |         }gcc
      |          ^~~
main.c:9:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:13: error: expected ';' before 'for'
    9 |         }gcc
      |             ^
      |             ;
   10 |         for(i=1; i<=10; i++){
      |         ~~~
Language: C

#include <iostream>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    priority_queue< int,vector<int>,less<int> > que;
    int in;
 
    for(int i = 0; i < 10; i++){
        cin >> in;
        que.push(in);
    }
 
 
    for(int j = 0; j < 3; j++){
        cout << que.top() << '\n';
        que.pop();
    }
 
    return 0;
}

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

#include<stdio.h>

int main(void){
	int h, i;
	int h1 = 0, h2 = 0, h3 = 0;
        for(i = 0; i < 10 ; i++){
		scanf("%d", &h);
		if(h <= h3){
		}
		else if(h3 < h && h <= h2){
			h3 = h;
		}
		else if(h2 < h && h <= h1){
			h3 = h2;
			h2 = h;
		}
		else{
			h3 = h2;
			h2 = h1;
			h1 = h;
		}
	printf("%d\n%d\n%d\n", h1, h2, h3);	
}

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

#include<stdio.h>

int main(){
int i,temp,j;
int A[10];

for(i=0;i<10;i++){
 scanf("%d",&A[i]);}

for(j=9;j>=1;j--){
for(i=0;i<j;i++){
 if(A[i]>A[i+1]){temp=A[i];A[i]=A[i+1];A[i+1]=temp;}}

for(i=9;i>=7;i--){
printf("%d\n",A[i]);
}

return 0;
}

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

#include <stdio.h>

int main ()
{
	int heights[3];
	int input;

	for (int i = 0; i < 10; i++) {
		scanf("%d", &input);
		if (input > heights[0]) {
			heights[2] = heights[1];
			heights[1] = heights[0];
			heights[0] = input;
		} else if (input <= heights[0] && input > heights[1]) {
			heights[2] = heights[1];
			heights[1] = input;
		} else if (inputs <= heights[1] && input > heights[2]) {
			heights[1] = input;
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:28: error: 'inputs' undeclared (first use in this function); did you mean 'input'?
   17 |                 } else if (inputs <= heights[1] && input > heights[2]) {
      |                            ^~~~~~
      |                            input
main.c:17:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main ()
{
	int heights[3];
	int input;

	for (int i = 0; i < 10; i++) {
		scanf("%d", &input);
		if (i == 0) {
			heights[0] = input;
		}
		if (input > heights[0]) {
			heights[2] = heights[1];
			heights[1] = heights[0];
			heights[0] = input;
		} else if (input <= heights[0] && input > heights[1]) {
			heights[2] = heights[1];
			heights[1] = input;
		} else if (inputs <= heights[1] && input > heights[2]) {
			heights[1] = input;
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:28: error: 'inputs' undeclared (first use in this function); did you mean 'input'?
   20 |                 } else if (inputs <= heights[1] && input > heights[2]) {
      |                            ^~~~~~
      |                            input
main.c:20:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main ()
{
	int heights[3] = {0};
	int input;

	for (int i = 0; i < 10; i++) {
		scanf("%d", &input);
		if (input > heights[0]) {
			heights[2] = heights[1];
			heights[1] = heights[0];
			heights[0] = input;
		} else if (input <= heights[0] && input > heights[1]) {
			heights[2] = heights[1];
			heights[1] = input;
		} else if (inputs <= heights[1] && input > heights[2]) {
			heights[1] = input;
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:28: error: 'inputs' undeclared (first use in this function); did you mean 'input'?
   17 |                 } else if (inputs <= heights[1] && input > heights[2]) {
      |                            ^~~~~~
      |                            input
main.c:17:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <windows.h>

int main(void)
{
	int height[10];
	int i;
	int highest;
	int hikisu;
	int j;
	
	for(i=0;i<10;i++)
	{
		scanf("%d",&height[i]);
	}
	
	for(j=0;j<3;j++)
	{
	
		highest = -999;
		
		for(i=0;i<10;i++)
		{
			if(highest <= height[i])
			{
				highest = height[i];
				hikisu = i;
			}
		}
		
		printf("%d\n",highest);
		
		height[hikisu] = -1;
		
	}
	
	return 0;
}

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

#include<iostream>

using namespace std;

int main()
{
    int a,b,c,t,n,sum=0;
    cin >> t;
    while(t--)
    {
        sum=0;
        cin >> n;
        for(c=0;c<n;c++)
        {
            cin >> a;
            sum+=a;
        }
        cout << sum - n + 1 <<endl;
    }

    return 0;
}


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

include<stdio.h>

int main()
{
  int h[10];
  int a = 0, b = 0, c = 0;
  int i;
  for(i = 0; i < 10; i++)
  {
    scanf("%d", &h[i]);
  }
  for(i = 0; i < 10; i++)
  {
    if(h[i] > a)
    a = h[i];
  }
  for(i = 0; i < 10; i++)
  {
    if(h[i] > b && h[i] < a)
    b = h[i];
  }
  for(i = 0; i < 10; i++)
  {
    if(h[i] > c && h[i] < b)
    c = h[i];
  }
  printf("%d\n%d\n%d\n", a, b, c);

  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 h[10];
  int a = 0, b = 0, c = 0;
  int i;

  for(i = 0; i < 10; i++)
  {
    scanf("%d", &h[i]);
  }

  for(i = 0; i < 10; i++)
  {
    if(h[i] > a)
    a = h[i];
  }

  for(i = 0; i < 10; i++)
  {
    if(h[i] > b && h[i] < a)
    b = h[i];
  }

  for(i = 0; i < 10; i++)
  {
    if(h[i] > c && h[i] < b)
    c = h[i];
  }
  printf("%d\n%d\n%d\n", a, b, c);

  return 0;
}



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

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

using namespace std;

int main() {
	int m[10];

	for (int i = 0; i < 10; i++)scanf("%d", &[i]);

	stable_sort(m, m + 10);

	for (int i = 9; i > 6; i--)printf("%d\n", &m[i]);

	return 0;
}


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

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

using namespace std;

int main() {
	int m[10];

	for (int i = 0; i < 10; i++)scanf("%d", &m[i]);

	stable_sort(m, m + 10);

	for (int i = 9; i > 6; i--)printf("%d\n", &m[i]);

	return 0;
}


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

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

using namespace std;

int main() {
	int m[10];

	for (int i = 0; i < 10; i++)scanf("%d", &m[i]);

	stable_sort(m, m + 10);
	
	for(int i=9;i>6;i--)printf("%d\n", m[9]);

	return 0;
}


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

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

using namespace std;

int main() {
	int m[10];

	for (int i = 0; i < 10; i++)scanf("%d", &m[i]);

	stable_sort(m, m + 10);
	
	for(int i=9;i>6;i--)printf("%d\n", m[i]);

	return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG true
// sort(a.begin(), a.end(), std::greater<int>());

/*
std::vector<std::string> split(const std::string &input, char delimiter)
{
    std::istringstream stream(input);

    std::string field;
    std::vector<std::string> result;
    while (std::getline(stream, field, delimiter))
    {
        result.push_back(field);
    }
    return result;
}
*/

int main()
{
    //変数の宣言
    int a[10];
    int i = 0;
    //入力
    while (scanf("%d", &a[i++]) + 1);
    //降順にsort
    for(int i=0;i<10;i++){
        for(int j=i+1;j<10;j++){
            int temp=0;
            if(a[i]<a[j]){
                //入れ替える(swap)
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
        }
    }
    for(int i=0;i<3;i++){
        printf("%d\n",a[i]);
    }
    return 0;
}



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

#include <bits/stdc++.h>
using namespace std;
int a[1000010];
int main()
{
	for(int i=0;i<10;i++)
	{
		cin>>a[i];
	}
	sort(a,a+10);
	cout<<a[9]<<endl<<a[8]<<endl<<a[7];
	return 0;
}


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

#include<stdio.h>

int main() {
	int a[10], b, c, d;

	for (b = 0; b < 10; b++) {
		printf("山の高さ%d:\n", b+1);
		scanf_s("%d", &a[b]);
	}
	for (b = 0; b < 9; b++) {
		for (c = b+1; c < 10; c++) {
			if (a[b] <=a[c]) {
				d = a[b];
				a[b] = a[c];
				a[c] = d;
			}
		}
	}
	for (b = 0; b < 3; b++)
		printf("%d\n",a[b]);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |                 scanf_s("%d", &a[b]);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <iostream>
#include <vector>

using namespace std;

int main(){
	int e; 	
	vector<int> a;

	while(cin >> e){
		a.push_back(e);
	}

	for(int i = 0; i < a.size(); i++){
		for(int j = i+1; j < a.size(); j++){
			if(a[i] < a[j]) swap(a[i], a[j]); 
		}                           	
	}

	for(int i = 0; i < 3; i++)
		cout << a[i] << 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 <stdio.h>
main(){
  int a[10],1,max;
  while(i<10){
    scanf("%d\n",a[i]);
    i++;
  }
  max(a,10,3);
  while(i<3){
    printf("%d\n",a[i]);
  }
return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:13: error: expected identifier or '(' before numeric constant
    3 |   int a[10],1,max;
      |             ^
main.c:4:9: error: 'i' undeclared (first use in this function)
    4 |   while(i<10){
      |         ^
main.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:3: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
    8 |   max(a,10,3);
      |   ^~~
Language: C

#include <stdio.h>
main(){
  int a[10],i,max;
  while(i<10){
    scanf("%d\n",a[i]);
    i++;
  }
  max(a,10,3);
  while(i<3){
    printf("%d\n",a[i]);
  }
return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:3: error: called object 'max' is not a function or function pointer
    8 |   max(a,10,3);
      |   ^~~
main.c:3:15: note: declared here
    3 |   int a[10],i,max;
      |               ^~~
Language: C

include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  while(i<10){
    scanf("%d",a[i]);
    i++;
  }
  max=a[0];

  while(i<10){
    if(a[i]>max) max=a[i]);
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
return 0; 
}

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

include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  while(i<10){
    scanf("%d",a[i]);
    i++;
  }
  max=a[0];

  while(i<10){
    if(a[i]>max) max=a[i]);
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
return0; 
}

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

#include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  while(i<10){
    scanf("%d",a[i]);
    i++;
  }
  max=a[0];

  while(i<10){
    if(a[i]>max) max=a[i];
    else;
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=a[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    else;
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
    else;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:35:5: error: 'else' without a previous 'if'
   35 |     else;
      |     ^~~~
Language: C

#include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  while(i<10){
    scanf("%d",&a[i]);
    i++;
  }
  max=a[0];

  while(i<10){
    if(a[i]>max) max=a[i];
    else;
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=a[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    else;
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
    else;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:35:5: error: 'else' without a previous 'if'
   35 |     else;
      |     ^~~~
Language: C

#include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
i=0;
  while(i<10){
    scanf("%d",&a[i]);
    i++;
  }
  max=a[0];

  while(i<10){
    if(a[i]>max) max=a[i];
    else;
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=a[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    else;
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
    else;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:36:5: error: 'else' without a previous 'if'
   36 |     else;
      |     ^~~~
Language: C

#include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  i=0;
  while(scanf("%d%d%d%d%d%d%d%d%d%d",&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&a[0]) !EOF){
  max=a[0];
  i=0;
  while(i<10){
    if(a[i]>max) max=a[i];
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=a[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
return 0; 
}
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:5:98: error: expected ')' before '!' token
    5 |   while(scanf("%d%d%d%d%d%d%d%d%d%d",&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&a[0]) !EOF){
      |        ~                                                                                         ^~
      |                                                                                                  )
Language: C

#include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  i=0;
  while(scanf("%d%d%d%d%d%d%d%d%d%d",&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&a[0]) !EOF){
  max=a[0];
  i=0;
  while(i<10){
    if(a[i]>max) max=a[i];
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=a[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
  }
return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:5:98: error: expected ')' before '!' token
    5 |   while(scanf("%d%d%d%d%d%d%d%d%d%d",&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&a[0]) !EOF){
      |        ~                                                                                         ^~
      |                                                                                                  )
Language: C

#include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  i=0;
  while(i<10){
    scanf("%d",&f[i]);
  }
  max=a[0];
  i=0;
  while(i<10){
    if(a[i]>max) max=a[i];
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=a[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
  }

printf("%d\n%d\n%d\n",max,m2,m3);
return 0; 
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:6:17: error: 'f' undeclared (first use in this function)
    6 |     scanf("%d",&f[i]);
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
intq,r,i,a[10],sum[]={0,0,0};
for(q=0;q<10;q++)
scanf("%d",&a[q]);

for(i=0;i<10;i++)
if(sum[0]<=a[i])
sum[0]=a[i];
}

for(i=0;i<10;i++)
if(sum[1]<=a[i]&&a[i]<sum[0])
sum[1]=a[i];
}

for(i=0;i<10;i++){
if(sum[2]<=a[i]&&a[i]<sum[1])
sum[2]=a[i];
}
for(r=0;r<3;r++)
printf("%d\n",sum[r]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: 'intq' undeclared (first use in this function); did you mean 'int'?
    3 | intq,r,i,a[10],sum[]={0,0,0};
      | ^~~~
      | int
main.c:3:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:6: error: 'r' undeclared (first use in this function)
    3 | intq,r,i,a[10],sum[]={0,0,0};
      |      ^
main.c:3:8: error: 'i' undeclared (first use in this function)
    3 | intq,r,i,a[10],sum[]={0,0,0};
      |        ^
main.c:3:10: error: 'a' undeclared (first use in this function)
    3 | intq,r,i,a[10],sum[]={0,0,0};
      |          ^
main.c:3:16: error: 'sum' undeclared (first use in this function)
    3 | intq,r,i,a[10],sum[]={0,0,0};
      |                ^~~
main.c:3:20: error: expected expression before ']' token
    3 | intq,r,i,a[10],sum[]={0,0,0};
      |                    ^
main.c:4:5: error: 'q' undeclared (first use in this function)
    4 | for(q=0;q<10;q++)
      |     ^
main.c: At top level:
main.c:12:1: error: expected identifier or '(' before 'for'
   12 | for(i=0;i<10;i++)
      | ^~~
main.c:12:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   12 | for(i=0;i<10;i++)
      |          ^
main.c:12:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   12 | for(i=0;i<10;i++)
      |               ^~
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
main.c:17:1: error: expected identifier or '(' before 'for'
   17 | for(i=0;i<10;i++){
      | ^~~
main.c:17:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   17 | for(i=0;i<10;i++){
      |          ^
main.c:17:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   17 | for(i=0;i<10;i++){
      |               ^~
main.c:21:1: error: expected identifier or '(' before 'for'
   21 | for(r=0;r<3;r++)
      | ^~~
main.c:21:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   21 | for(r=0;r<3;r++)
      |          ^
main.c:21:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   21 | for(r=0;r<3;r++)
      |              ^~
main.c:23:1: error: expected identifier or '(' before 'return'
   23 | return 0;
      | ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C

#include<stdio.h>
int main(){
int q,r,i,a[10],sum[]={0,0,0};
for(q=0;q<10;q++)
scanf("%d",&a[q]);

for(i=0;i<10;i++)
if(sum[0]<=a[i])
sum[0]=a[i];
}

for(i=0;i<10;i++)
if(sum[1]<=a[i]&&a[i]<sum[0])
sum[1]=a[i];
}

for(i=0;i<10;i++){
if(sum[2]<=a[i]&&a[i]<sum[1])
sum[2]=a[i];
}
for(r=0;r<3;r++)
printf("%d\n",sum[r]);
return 0;
}

Compiler output:
main.c:12:1: error: expected identifier or '(' before 'for'
   12 | for(i=0;i<10;i++)
      | ^~~
main.c:12:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   12 | for(i=0;i<10;i++)
      |          ^
main.c:12:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   12 | for(i=0;i<10;i++)
      |               ^~
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
main.c:17:1: error: expected identifier or '(' before 'for'
   17 | for(i=0;i<10;i++){
      | ^~~
main.c:17:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   17 | for(i=0;i<10;i++){
      |          ^
main.c:17:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   17 | for(i=0;i<10;i++){
      |               ^~
main.c:21:1: error: expected identifier or '(' before 'for'
   21 | for(r=0;r<3;r++)
      | ^~~
main.c:21:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   21 | for(r=0;r<3;r++)
      |          ^
main.c:21:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   21 | for(r=0;r<3;r++)
      |              ^~
main.c:23:1: error: expected identifier or '(' before 'return'
   23 | return 0;
      | ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C

#include<stdio.h>
int main(){
int z,x,q,r,i,o,p,a[10],sum[3];
for(q=0;q<10;q++)
scanf("%d",&a[q]);
for(i=0;i<10;i++){
if(sum[0]<=a[i]){
sum[0]=a[i];
z=i;}
}
for(o=0;o<10;o++){
if(sum[1]<=a[p]&&o!=z){
sum[1]=a[o];
x=o;}
}
for(p=0;p<1-;p++){
if(sum[2]<=a[p]&&(p!=x))
sum[2]=a[p];
}
for(r=0;r<3;r++)
printf("%d",sum[r]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:13: error: expected expression before ';' token
   16 | for(p=0;p<1-;p++){
      |             ^
Language: C

#include<stdio.h>

int main()
{
	int mount[10],i,j,l;
	
	for(i=0;i<10;i++)
	{
		scnaf("%d",&mount[i]);
	}
	for(i=0;i<3;i++)
	{
		for(j=i;j<10;j++)
		{
			if(mount[i]<mount[j])
			{
				l=mount[i];
				mount[i]=mount[j];
				mount[j]=mount[i];
			}
		}
	}
	for(i=0;i<3;i++)
		printf("%d",moutn[i]);
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |                 scnaf("%d",&mount[i]);
      |                 ^~~~~
      |                 scanf
main.c:24:29: error: 'moutn' undeclared (first use in this function); did you mean 'mount'?
   24 |                 printf("%d",moutn[i]);
      |                             ^~~~~
      |                             mount
main.c:24:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
int i,j,buf[10],best[3]={0,0,0};

for(i=1;i<=10;i++){
scanf("%d",&buf[i-1]);
}

for(i=0;i<10;i++){
for(j=0;j<3;j++)
if(buf[i]>=best[j]){
best[j]=buf[i];
continue;
}
}
printf("%d\n%d\n%d\n",best[0],best[1],best[2]);
return 0;

Compiler output:
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
   18 | return 0;
      | ^~~~~~
Language: C

include <stdio.h>

void main()
{
  int i, j, k, input, top[3];
  for (i = 0; i <= 2; i++)
    top[i] = 0;


  for (i = 10; i > 0; i--) {
    scanf("%d", &input);
    
    if (input > top[0]) {
      top[2] = top[1];
      top[1] = top[0];
      top[0] = input;
    } else if (input > top[1]) {
      top[2] = top[1];
      top[1] = input;
    } else if (input > top[2]) {
      top[2] = input;
    }
    
  }

  for (i = 0; i <= 2; i++)
    printf("%d\n", top[i]);
}

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

#include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];

for(a=0;a<10;a++){ scanf("%d",%N[a]);}

for(b=0;b<10;b++){ b=a_max;
for(c=b;c<10;c++){ if(a_max<c){c=a_max;}  }
d=c; c=a_max; a_max=d;

return0;
}

Compiler output:
main.c: In function 'main':
main.c:5:31: error: expected expression before '%' token
    5 | for(a=0;a<10;a++){ scanf("%d",%N[a]);}
      |                               ^
main.c:11:1: error: 'return0' undeclared (first use in this function)
   11 | return0;
      | ^~~~~~~
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:1: error: expected declaration or statement at end of input
   12 | }
      | ^
Language: C

#include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];

for(a=0;a<10;a++){ scanf("%d",&N[a]);}

for(b=0;b<10;b++){ b=a_max;
for(c=b;c<10;c++){ if(a_max<c){c=a_max;}  }
d=c; c=a_max; a_max=d;

return0;
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: 'return0' undeclared (first use in this function)
   11 | return0;
      | ^~~~~~~
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:1: error: expected declaration or statement at end of input
   12 | }
      | ^
Language: C

#include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];

for(a=0;a<10;a++){ scanf("%d",&N[a]);}

for(b=0;b<10;b++){ b=a_max;
for(c=b;c<10;c++){ if(a_max<c){c=a_max;}  
d=c; c=a_max; a_max=d; }

return0;
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: 'return0' undeclared (first use in this function)
   11 | return0;
      | ^~~~~~~
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:1: error: expected declaration or statement at end of input
   12 | }
      | ^
Language: C

#include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];

for(a=0;a<10;a++){ scanf("%d",&N[a]);}

for(b=0;b<10;b++){ b=a_max;
for(c=b;c<10;c++){ if(a_max<c){c=a_max;}  
d=c; c=a_max; a_max=d; }

printf("%d\n%d\n%d\n",N[0],N[1],N[2]);

return 0;
}

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

#include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];

for(a=0;a<10;a++){ scanf("%d",&N[a]);}

for(b=0;b<10;b++){ b=a_max;
for(c=b;c<10;c++){ if(N[a_max]<N[c]){c=a_max;}  
d=c; c=a_max; a_max=d; }

printf("%d\n%d\n%d\n",N[0],N[1],N[2]);

return 0;
}

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

#include<stdio.h>
int main(void){
  int f,j,a[10],i;
  i=0;
  j=0;
  a[9]=0;
  t=0;

  for(i=0;i<10;i++){
    scanf("%d",&a[i]);
  }

  for(i=0;i<9;i++)
    {
      for(j=f+1;j<10;j++)
	{
	  if(a[i]<a[j])
	    {
	      t=a[i];
	      a[i]=a[j];
	      a[j]=t;
	    }
	}
    }
  printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 't' undeclared (first use in this function)
    7 |   t=0;
      |   ^
main.c:7:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void){
  int t,j,a[10],i;
  i=0;
  j=0;
  a[9]=0;
  t=0;

  for(i=0;i<10;i++){
    scanf("%d",&a[i]);
  }

  for(i=0;i<9;i++)
    {
      for(j=f+1;j<10;j++)
	{
	  if(a[i]<a[j])
	    {
	      t=a[i];
	      a[i]=a[j];
	      a[j]=t;
	    }
	}
    }
  printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:13: error: 'f' undeclared (first use in this function)
   15 |       for(j=f+1;j<10;j++)
      |             ^
main.c:15:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void)
{
    int i,j,m[10],h[3]={0};
    for(i=0;i<10;i++){
        scanf("%d",&mou[i]);
    }
    puts("\n");
    for(i=0;i<10;i++){
        if(m[i]>h[2])h[2]=m[i];
        if(h[2]>h[1]){j=h[1];h[1]=h[2];h[2]=j;}
        if(h[1]>h[0]){j=h[0];h[0]=h[1];h[1]=j;}
    }
    for(i=0;i<3;i++){
        printf("%d\n",h[i]);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:21: error: 'mou' undeclared (first use in this function)
    6 |         scanf("%d",&mou[i]);
      |                     ^~~
main.c:6:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<iostream>
#include<queue>
using namespace std;
#define SIZE 3000000
typedef struct T{
	int kid[4],next[4],ch,par,fail,state;
}T;
T tree[SIZE];
const int root=1;
int tp;
void build(int *x,int len,int num)
{
	int cur=root;
	while(len--){
		if(tree[cur].kid[x[0]]==0){
			tp++;
			memset(tree+tp,0,sizeof(tree[0]));
			tree[cur].kid[x[0]]=tp;
			tree[tp].par=cur;
			tree[tp].ch=x[0];
		}
		cur=tree[cur].kid[x[0]];
		x++;
	}
	tree[cur].state|=(1<<(num-1));
}
int trans(char*s,int *x)
{
	int len=strlen(s);
	for(int i=0;i<len;i++){
		switch(s[i]){
			case 'A':x[i]=0;break;
			case 'C':x[i]=1;break;
			case 'T':x[i]=2;break;
			case 'G':x[i]=3;break;
		}
	}
	return len;
}
void fail(void)
{
	int cur,par,i;
	queue<int>q;
	tree[root].par=tree[root].fail=-1;
	q.push(root);
	while(q.empty()==false){
		cur=q.front();
		q.pop();
		for(i=0;i<4;i++)
			if(tree[cur].kid[i])
				q.push(tree[cur].kid[i]);
		par=tree[cur].par;
		while(1){
			if(par==root||par==-1){
				tree[cur].fail=root;
				break;
			}
			else{
				par=tree[par].fail;
				if(tree[par].kid[tree[cur].ch]){
					tree[cur].fail=tree[par].kid[tree[cur].ch];
					break;
				}
			}
		}
	}
}
void state(void)
{
	int cur,par,i;
	queue<int>q;
	q.push(root);
	while(q.empty()==false){
		cur=q.front();
		q.pop();
		for(i=0;i<4;i++)
			if(tree[cur].kid[i])
				q.push(tree[cur].kid[i]);
		par=tree[cur].fail;
		while(par!=root){
			tree[cur].state|=tree[par].state;
			par=tree[par].fail;
		}
	}
}
void next(void)
{
	int cur,par,i,j,k;
	for(i=root;i<=tp;i++){
		for(j=0;j<4;j++){
			if(tree[i].kid[j])
				tree[i].next[j]=tree[i].kid[j];
			else{
				tree[i].next[j]=root;
				par=i;
				while(par!=root){
					par=tree[par].fail;
					if(tree[par].kid[j]){
						tree[i].next[j]=tree[par].kid[j];
						break;
					}
				}
			}
		}
	}
}
bool res[2][1100][1100];
int w[20];
int val[1100];
void cal(int n)
{
	int maxn=(1<<n);
	for(int i=0;i<maxn;i++){
		val[i]=0;
		for(int j=0;j<n;j++){
			if(((i>>j)&1)==1)
				val[i]+=w[j+1];
		}
	}
}
int dp(int n,int l)
{
	int i,j,k,q;
	int pre,cur;
	int maxn=(1<<n);
	
	for(i=1;i<=l;i++){
		pre=i%2;
		cur=!pre;
		memset(res[cur],false,sizeof(res[cur]));
		if(i==1){
			memset(res[pre],false,sizeof(res[pre]));
			res[pre][root][0]=true;
		}
		for(j=root;j<=tp;j++){
			for(q=0;q<maxn;q++){
				if(res[pre][j][q]==true)
					for(k=0;k<4;k++){
						res[cur][tree[j].next[k]][tree[tree[j].next[k]].state|q]=true;
					}
			}
		}
	}
	int ans=-1;
	for(j=root;j<=tp;j++){
		for(q=0;q<maxn;q++){
			if(res[cur][j][q]==true)
				ans=max(ans,val[q]);
		}
	}
	return ans;
}
int main()
{
	int n,l,i,j,a,b;
	int x[200];
	char s[200];

	while(scanf("%d %d",&n,&l)==2){
		tp=1;
		memset(&tree[root],0,sizeof(tree[0]));
		for(i=1;i<=n;i++){
			scanf("%s %d",s,&w[i]);
			build(x,trans(s,x),i);
		}
		fail();
		state();
		next();
		int ans=dp(n,l);
		if(ans==-1)
			printf("No Rabbit after 2012!\n");
		else
			printf("%d\n",ans);
	}
	return 0;
}

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

a[],i;
c(int*a){a=*a-*1[&a];}
main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[],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.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | c(int*a){a=*a-*1[&a];}
      | ^
main.c: In function 'c':
main.c:2:11: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2 | c(int*a){a=*a-*1[&a];}
      |           ^
main.c: At top level:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      | ^~~~
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[],i;
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:40: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                                        ^~~~~~
main.c:3:40: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:40: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:40: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:38: error: lvalue required as left operand of assignment
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                                      ^
main.c: At top level:
main.c:1:1: warning: array 'a' assumed to have one element
    1 | a[],i;
      | ^
Language: C

a[],i;
c(int*a){a=*a-*1[&a];}
main(){~scanf("%d",a+(i++))&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[],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.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | c(int*a){a=*a-*1[&a];}
      | ^
main.c: In function 'c':
main.c:2:11: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2 | c(int*a){a=*a-*1[&a];}
      |           ^
main.c: At top level:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){~scanf("%d",a+(i++))&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      | ^~~~
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | main(){~scanf("%d",a+(i++))&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[],i;
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | main(){~scanf("%d",a+(i++))&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:42: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 | main(){~scanf("%d",a+(i++))&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                                          ^~~~~~
main.c:3:42: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:42: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:42: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:40: error: lvalue required as left operand of assignment
    3 | main(){~scanf("%d",a+(i++))&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                                        ^
main.c: At top level:
main.c:1:1: warning: array 'a' assumed to have one element
    1 | a[],i;
      | ^
Language: C

a[],i;
c(int*a){a=*a-*1[&a];}
main(){~scanf("%d",a+i++)&&main(sort(a,10,4,c))||(i=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a[],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.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | c(int*a){a=*a-*1[&a];}
      | ^
main.c: In function 'c':
main.c:2:11: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2 | c(int*a){a=*a-*1[&a];}
      |           ^
main.c: At top level:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){~scanf("%d",a+i++)&&main(sort(a,10,4,c))||(i=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      | ^~~~
main.c: In function 'main':
main.c:3:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | main(){~scanf("%d",a+i++)&&main(sort(a,10,4,c))||(i=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a[],i;
main.c:3:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | main(){~scanf("%d",a+i++)&&main(sort(a,10,4,c))||(i=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |         ^~~~~
main.c:3:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:33: error: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
    3 | main(){~scanf("%d",a+i++)&&main(sort(a,10,4,c))||(i=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                                 ^~~~
main.c:3:54: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    3 | main(){~scanf("%d",a+i++)&&main(sort(a,10,4,c))||(i=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                                                      ^~~~~~
main.c:3:54: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:3:54: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:3:54: 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;
      | ^