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

import java.io.bufferedreader;
import java.io.inputstreamreader;
import java.util.arrays;

class aoj001{
  public static void main(string[] a){
    bufferedreader br = new bufferedreader(new inputstreamreader(system.in));
    int[] arr = new int[10]; 
    for (int i = 0; i<10; i++)
      arr[i] = integer.parseint(br.readline());

    arrays.sort(arr);
    for (int i = 0; i < 3; i++)
      system.out.println(arr[i]);
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.bufferedreader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.inputstreamreader;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.arrays;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:9: error: expected ':' before 'static'
    6 |   public static void main(string[] a){
      |         ^~~~~~~
      |         :
a.cc:6:27: error: 'string' has not been declared
    6 |   public static void main(string[] a){
      |                           ^~~~~~
a.cc:6:36: error: expected ',' or '...' before 'a'
    6 |   public static void main(string[] a){
      |                                    ^
a.cc:16:2: error: expected ';' after class definition
   16 | }
      |  ^
      |  ;
a.cc: In static member function 'static void aoj001::main(int*)':
a.cc:7:5: error: 'bufferedreader' was not declared in this scope
    7 |     bufferedreader br = new bufferedreader(new inputstreamreader(system.in));
      |     ^~~~~~~~~~~~~~
a.cc:8:8: error: structured binding declaration cannot have type 'int'
    8 |     int[] arr = new int[10];
      |        ^~
a.cc:8:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:8: error: empty structured binding declaration
a.cc:8:11: error: expected initializer before 'arr'
    8 |     int[] arr = new int[10];
      |           ^~~
a.cc:10:7: error: 'arr' was not declared in this scope
   10 |       arr[i] = integer.parseint(br.readline());
      |       ^~~
a.cc:10:16: error: 'integer' was not declared in this scope
   10 |       arr[i] = integer.parseint(br.readline());
      |                ^~~~~~~
a.cc:10:33: error: 'br' was not declared in this scope
   10 |       arr[i] = integer.parseint(br.readline());
      |                                 ^~
a.cc:12:5: error: 'arrays' was not declared in this scope
   12 |     arrays.sort(arr);
      |     ^~~~~~
a.cc:12:17: error: 'arr' was not declared in this scope
   12 |     arrays.sort(arr);
      |                 ^~~
a.cc:14:7: error: 'system' was not declared in this scope
   14 |       system.out.println(arr[i]);
      |       ^~~~~~
Language: C++

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.arrays;

class aoj001{
  public static void main(string[] a){
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int[] arr = new int[10]; 
    for (int i = 0; i<10; i++)
      arr[i] = integer.parseint(br.readline());

    arrays.sort(arr);
    for (int i = 0; i < 3; i++)
      system.out.println(arr[i]);
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.arrays;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:9: error: expected ':' before 'static'
    6 |   public static void main(string[] a){
      |         ^~~~~~~
      |         :
a.cc:6:27: error: 'string' has not been declared
    6 |   public static void main(string[] a){
      |                           ^~~~~~
a.cc:6:36: error: expected ',' or '...' before 'a'
    6 |   public static void main(string[] a){
      |                                    ^
a.cc:16:2: error: expected ';' after class definition
   16 | }
      |  ^
      |  ;
a.cc: In static member function 'static void aoj001::main(int*)':
a.cc:7:5: error: 'BufferedReader' was not declared in this scope
    7 |     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      |     ^~~~~~~~~~~~~~
a.cc:8:8: error: structured binding declaration cannot have type 'int'
    8 |     int[] arr = new int[10];
      |        ^~
a.cc:8:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:8: error: empty structured binding declaration
a.cc:8:11: error: expected initializer before 'arr'
    8 |     int[] arr = new int[10];
      |           ^~~
a.cc:10:7: error: 'arr' was not declared in this scope
   10 |       arr[i] = integer.parseint(br.readline());
      |       ^~~
a.cc:10:16: error: 'integer' was not declared in this scope
   10 |       arr[i] = integer.parseint(br.readline());
      |                ^~~~~~~
a.cc:10:33: error: 'br' was not declared in this scope
   10 |       arr[i] = integer.parseint(br.readline());
      |                                 ^~
a.cc:12:5: error: 'arrays' was not declared in this scope
   12 |     arrays.sort(arr);
      |     ^~~~~~
a.cc:12:17: error: 'arr' was not declared in this scope
   12 |     arrays.sort(arr);
      |                 ^~~
a.cc:14:7: error: 'system' was not declared in this scope
   14 |       system.out.println(arr[i]);
      |       ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int number[10];
int count = 0;
int flag = 0;
int temp = 0;

int main(){

        for(count=0;count<10;count++){
                cin >> number[count];
                }
        count = 0;

        while(flag<10){
                for(count=0;count<9;count++){
                        if(number[count]<number[count+1]){
                                temp=number[count];
                                number[count]=number[count+1];
                                number[count+1]=tempa;
                        }
                }
                flag++;
}
        for(count=0;count<3;count++){
                cout<<number[count]<<endl;
        }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:49: error: 'tempa' was not declared in this scope; did you mean 'temp'?
   21 |                                 number[count+1]=tempa;
      |                                                 ^~~~~
      |                                                 temp
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int a,mountain[10],j,k;
	for(int i=0;i<10;i++){
		cin>>moutain[i];
	}
	for(j=0;j<10;j++){
		for(k=0;k<10-j;k++){
			if(mountain[k]<mountain[k+1]){
				a=mountain[k];
				mountain[k]=montain[k+1];
				mountain[k+1]=a;
			}
		}
	}
	cout<<mountain[0]<<"\n"<<moutnain[1]<<"\n"<<mountain[2]<<"\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'moutain' was not declared in this scope; did you mean 'mountain'?
    7 |                 cin>>moutain[i];
      |                      ^~~~~~~
      |                      mountain
a.cc:13:45: error: 'montain' was not declared in this scope; did you mean 'mountain'?
   13 |                                 mountain[k]=montain[k+1];
      |                                             ^~~~~~~
      |                                             mountain
a.cc:18:34: error: 'moutnain' was not declared in this scope; did you mean 'mountain'?
   18 |         cout<<mountain[0]<<"\n"<<moutnain[1]<<"\n"<<mountain[2]<<"\n";
      |                                  ^~~~~~~~
      |                                  mountain
Language: C++

#include<iostream>

int main(void)
{
	int i,max,tmp,high[10];

	for(i=0;i<10;i++){
		std::cin >> high[i];
	}

	for(i=0;i<3;i++){
		for(j=1,max=high[0];j<10;j++){
			if(max<high[j]){
				max=high;
				tmp=j;
			}
		}
		high[tmp]=0;
		std::cout << max << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'j' was not declared in this scope
   12 |                 for(j=1,max=high[0];j<10;j++){
      |                     ^
a.cc:14:37: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   14 |                                 max=high;
      |                                     ^~~~
      |                                     |
      |                                     int*
Language: C++

#include<iostream>

int main(void)
{
	int i,j,max,tmp,high[10];

	for(i=0;i<10;i++){
		std::cin >> high[i];
	}

	for(i=0;i<3;i++){
		for(j=1,max=high[0];j<10;j++){
			if(max<high[j]){
				max=high;
				tmp=j;
			}
		}
		high[tmp]=0;
		std::cout << max << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:37: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   14 |                                 max=high;
      |                                     ^~~~
      |                                     |
      |                                     int*
Language: C++

#include<iostream>

int main(void)
{
	int i,j,max,tmp,high[10];

	for(i=0;i<10;i++){
		std::cin >> high[i];
	}

	for(i=0;i<3;i++){
		for(j=1,tmp=1,max=high[0];j<10;j++){
			if(max<high[j]){
				max=high;
				tmp=j;
			}
		}
		high[tmp]=0;
		std::cout << max << std::endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:37: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   14 |                                 max=high;
      |                                     ^~~~
      |                                     |
      |                                     int*
Language: C++

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

using namespace std;

int main(){

	vector<int> mountains;
	
	for(int i= 0 ; i<10 ; i++){
		int a;
		cin>>a;
		mountains.push_back(a);
	}

	for(int i=0 ; i<mountains.size()-1 ; i++){
		for(int j=0 ; j<mountains.size()-1 ; j++){
			if(mountains[j] < mountaians[j+1]){
				int tmp;
				
				tmp = mountains[j];
				mountains[j] = mountains[j+1];
				mountains[j+1] = tmp;
			}
		}
	}

	for(int i ; i<3 ; i++){
		cout<<mountains[i]<<endl;
	}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:43: error: 'mountaians' was not declared in this scope; did you mean 'mountains'?
   19 |                         if(mountains[j] < mountaians[j+1]){
      |                                           ^~~~~~~~~~
      |                                           mountains
Language: C++

#include<iostream>

int main(){
            int a[10],i,j,n;
          
 
for(i=0,i<10,i++){
                std::cin>>a[i];
                          }
for(i=0,i<10,i++){
                for(j=i+1,j<10,j++){
                            if(a[i]<a[j]){
                n=a[i];
                a[i]=a[j];
                a[j]=n;
            }
       }
}
for(i=0,i<3,i++){
            std::cout<<a[i]<<std::endl;
           }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected ';' before ')' token
    7 | for(i=0,i<10,i++){
      |                 ^
      |                 ;
a.cc:10:1: error: expected primary-expression before 'for'
   10 | for(i=0,i<10,i++){
      | ^~~
a.cc:9:28: error: expected ';' before 'for'
    9 |                           }
      |                            ^
      |                            ;
   10 | for(i=0,i<10,i++){
      | ~~~                         
a.cc:10:1: error: expected primary-expression before 'for'
   10 | for(i=0,i<10,i++){
      | ^~~
a.cc:9:28: error: expected ')' before 'for'
    9 |                           }
      |                            ^
      |                            )
   10 | for(i=0,i<10,i++){
      | ~~~                         
a.cc:7:4: note: to match this '('
    7 | for(i=0,i<10,i++){
      |    ^
a.cc:10:17: error: expected ';' before ')' token
   10 | for(i=0,i<10,i++){
      |                 ^
      |                 ;
a.cc:19:1: error: expected primary-expression before 'for'
   19 | for(i=0,i<3,i++){
      | ^~~
a.cc:18:2: error: expected ';' before 'for'
   18 | }
      |  ^
      |  ;
   19 | for(i=0,i<3,i++){
      | ~~~
a.cc:19:1: error: expected primary-expression before 'for'
   19 | for(i=0,i<3,i++){
      | ^~~
a.cc:18:2: error: expected ')' before 'for'
   18 | }
      |  ^
      |  )
   19 | for(i=0,i<3,i++){
      | ~~~
a.cc:10:4: note: to match this '('
   10 | for(i=0,i<10,i++){
      |    ^
a.cc:19:16: error: expected ';' before ')' token
   19 | for(i=0,i<3,i++){
      |                ^
      |                ;
a.cc:22:1: error: expected primary-expression before 'return'
   22 | return 0;
      | ^~~~~~
a.cc:21:13: error: expected ';' before 'return'
   21 |            }
      |             ^
      |             ;
   22 | return 0;
      | ~~~~~~       
a.cc:22:1: error: expected primary-expression before 'return'
   22 | return 0;
      | ^~~~~~
a.cc:21:13: error: expected ')' before 'return'
   21 |            }
      |             ^
      |             )
   22 | return 0;
      | ~~~~~~       
a.cc:19:4: note: to match this '('
   19 | for(i=0,i<3,i++){
      |    ^
Language: C++

#include<iosteam>

int main(){
    int a[10], i, j ,n;
    for(i=0;i<10;i++){
        cin>>a[i];
        }
        
        for(i=0;i<10;i++){
        	for(j=i+1;j<10;j++){
        		if(a[i]<a[j]){
			n=a[i];
			a[i]=a[j];
			a[j]=n;
			}
		}	
	}
	for(i=0;i<3;i++){
	cout<<a[i]<<endl;
	}       	
	
	return 0;
}

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

#include<iostream>
using namespace std;

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
			}low = nyuryoku;
		}
	}
	}
	cout<<highendl<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: 'highendl' was not declared in this scope
   22 |         cout<<highendl<<endl;
      |               ^~~~~~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
		}else{low = nyuryoku;
	}
	}
}
	cout<<highendl<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected '}' before 'else'
   18 |                 }else{low = nyuryoku;
      |                  ^~~~
a.cc:13:36: note: to match this '{'
   13 |                 if(nyuryoku>middle){
      |                                    ^
a.cc:22:15: error: 'highendl' was not declared in this scope
   22 |         cout<<highendl<<endl;
      |               ^~~~~~~~
a.cc:26:2: error: expected '}' at end of input
   26 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
		}else{	
			low = nyuryoku;
		}
		}
	}
}
	cout<<highendl<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected '}' before 'else'
   18 |                 }else{
      |                  ^~~~
a.cc:13:36: note: to match this '{'
   13 |                 if(nyuryoku>middle){
      |                                    ^
a.cc:24:15: error: 'highendl' was not declared in this scope
   24 |         cout<<highendl<<endl;
      |               ^~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
		}else{	
			low = nyuryoku;
		}
		}
	}
}
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: expected '}' before 'else'
   18 |                 }else{
      |                  ^~~~
a.cc:13:36: note: to match this '{'
   13 |                 if(nyuryoku>middle){
      |                                    ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else
				middle = nyuryoku
			}else
				low = nyuryoku;
		}
		}
	}
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:17:50: error: expected ';' before '}' token
   17 |                                 middle = nyuryoku
      |                                                  ^
      |                                                  ;
   18 |                         }else
      |                         ~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int nyuryoku,high=0,low=0,middle=0,flag=0;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	flag++;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else
				middle = nyuryoku
			}else
				low = nyuryoku;
		}
		}
	}
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:18:50: error: expected ';' before '}' token
   18 |                                 middle = nyuryoku
      |                                                  ^
      |                                                  ;
   19 |                         }else
      |                         ~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int suchi,high=0,middle=0,low=0,i,flag=0,a,b,c;
	
	for(i=0;i<10;i++){
		cin>>suchi;
			
		if(flag==0){
			high = suchi;
			flag++;
			}
			
		else{
			if(suchi<low)
			
			else if(suchi>=low&&suchi<middle)
				low = suchi;
			
			else if(suchi>=middle&&suchi<high){
				low = middle;
				middle = suchi;
			}
			
			else{
				low = middle;
				middle = high;
				high = suchi;
				}
				
			}
	}
	
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected primary-expression before 'else'
   18 |                         else if(suchi>=low&&suchi<middle)
      |                         ^~~~
Language: C++

#include <cstdio>
#include <vector>
using namespace std;

int main(void) {
    vector<int> v;
    for (int i = 0; i < 10; i++) {
        int input;
        scanf("%d", &input);
        v.push_back(input);
    }
    sort(v.rbegin(), v.rend());
    for (int i = 0; i < 3; i++) {
        printf("%d\n", v[i]);
    }
}

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

a = Array.new(4,0)

10.times do
  a[3] = gets.chomp.to_i 
  3.times do |i|
    if a[2-i]<a[3-i]
      a[2-i], a[3-i] = a[3-i], a[2-i]
    else
      break
    end
  end
end
puts a[0]
puts a[1]
puts a[2]

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = Array.new(4,0)
      | ^
Language: C++

import java.io.*;
import java.util.*;
  
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InutStreamReader(System.in));
int n=10;
int[] k=new int[n];
for(int i=0;i<n;i++){
k[i]=Integer.parseInt(br.readLine());
}
Arrays.sort(k);
for(int i=0;i<3;i++){
System.out.println(k[n-i-1]);
}
}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:7: error: expected ':' before 'static'
    5 | public static void main(String[] args) throws IOException{
      |       ^~~~~~~
      |       :
a.cc:5:25: error: 'String' has not been declared
    5 | public static void main(String[] args) throws IOException{
      |                         ^~~~~~
a.cc:5:34: error: expected ',' or '...' before 'args'
    5 | public static void main(String[] args) throws IOException{
      |                                  ^~~~
a.cc:5:38: error: expected ';' at end of member declaration
    5 | public static void main(String[] args) throws IOException{
      |                                      ^
      |                                       ;
a.cc:5:40: error: 'throws' does not name a type
    5 | public static void main(String[] args) throws IOException{
      |                                        ^~~~~~
a.cc:17:2: error: expected ';' after class definition
   17 | }
      |  ^
      |  ;
Language: C++

using namespace std;
int main()
{
    int h[10],i,j,temp;
    for(i=0; i<10; i++)
    {
        cin>>h[i];
    }
    for(i=0; i<10-1; i++)
    {
        for(j=i; j<10; j++)
        {
            if(h[i]<h[j])
            {
                temp=h[i];
                h[i]=h[j];
                h[j]=temp;
            }
        }
    }
    for(i=0; i<3; i++)
    {
        cout<<h[i]<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>h[i];
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout<<h[i]<<endl;
      |         ^~~~
a.cc:23:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:23:21: error: 'endl' was not declared in this scope
   23 |         cout<<h[i]<<endl;
      |                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

int main()
{

        std::vector<int> vec;
        int a;

        for(int i = 0; i < 10; ++i)
        {
                std::cin >> a;
                vec.push_back(a);
        }

        std::sort(vec.begin(),vec.end());

        for(int i = 0; i < 3; ++i) std::cout << vec.at(9-i) << std::endl;

        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: 'vector' is not a member of 'std'
    4 |         std::vector<int> vec;
      |              ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | int main()
a.cc:4:21: error: expected primary-expression before 'int'
    4 |         std::vector<int> vec;
      |                     ^~~
a.cc:9:22: error: 'cin' is not a member of 'std'
    9 |                 std::cin >> a;
      |                      ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:10:17: error: 'vec' was not declared in this scope
   10 |                 vec.push_back(a);
      |                 ^~~
a.cc:13:14: error: 'sort' is not a member of 'std'
   13 |         std::sort(vec.begin(),vec.end());
      |              ^~~~
a.cc:13:19: error: 'vec' was not declared in this scope
   13 |         std::sort(vec.begin(),vec.end());
      |                   ^~~
a.cc:15:41: error: 'cout' is not a member of 'std'
   15 |         for(int i = 0; i < 3; ++i) std::cout << vec.at(9-i) << std::endl;
      |                                         ^~~~
a.cc:15:41: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:69: error: 'endl' is not a member of 'std'
   15 |         for(int i = 0; i < 3; ++i) std::cout << vec.at(9-i) << std::endl;
      |                                                                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int a[10],i;
    for(i=0;i<10;i++)cin>>a[i];
    sort(a,a+10);
    for(i=9;i>6;i--)cout<<a[i]<<endl;
    return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: expected ';' before '}' token
   10 |     return 0
      |             ^
      |             ;
   11 | }
      | ~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int 1st, 2nd, 3rd;
	1st=0;
	2nd=0;
	3rd=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > 3rd){
			if(height of mountain i > 2nd){
				if(height of mountain i > 1st){
					1st=i;
				}else{
					2nd=i;
				}
			}else{
				3rd=i;
			}
		}
	}
	cout << 1st << endl;
	cout << 2nd << endl;
	cout << 3rd << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: expected unqualified-id before numeric constant
    5 |         int 1st, 2nd, 3rd;
      |             ^~~
a.cc:6:9: error: unable to find numeric literal operator 'operator""st'
    6 |         1st=0;
      |         ^~~
a.cc:7:9: error: unable to find numeric literal operator 'operator""nd'
    7 |         2nd=0;
      |         ^~~
a.cc:8:9: error: unable to find numeric literal operator 'operator""rd'
    8 |         3rd=0;
      |         ^~~
a.cc:11:20: error: 'height' was not declared in this scope
   11 |                 if(height of mountain i > 3rd){
      |                    ^~~~~~
a.cc:11:26: error: expected ')' before 'of'
   11 |                 if(height of mountain i > 3rd){
      |                   ~      ^~~
      |                          )
a.cc:12:34: error: expected ')' before 'of'
   12 |                         if(height of mountain i > 2nd){
      |                           ~      ^~~
      |                                  )
a.cc:13:42: error: expected ')' before 'of'
   13 |                                 if(height of mountain i > 1st){
      |                                   ~      ^~~
      |                                          )
a.cc:14:41: error: unable to find numeric literal operator 'operator""st'
   14 |                                         1st=i;
      |                                         ^~~
a.cc:16:41: error: unable to find numeric literal operator 'operator""nd'
   16 |                                         2nd=i;
      |                                         ^~~
a.cc:19:33: error: unable to find numeric literal operator 'operator""rd'
   19 |                                 3rd=i;
      |                                 ^~~
a.cc:23:17: error: unable to find numeric literal operator 'operator""st'
   23 |         cout << 1st << endl;
      |                 ^~~
a.cc:24:17: error: unable to find numeric literal operator 'operator""nd'
   24 |         cout << 2nd << endl;
      |                 ^~~
a.cc:25:17: error: unable to find numeric literal operator 'operator""rd'
   25 |         cout << 3rd << endl;
      |                 ^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int first, second, third;
	first=0;
	second=0;
	third=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > third){
			if(height of mountain i > second){
				if(height of mountain i > first){
					first=i;
				}else{
					second=i;
				}
			}else{
				third=i;
			}
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'height' was not declared in this scope
   11 |                 if(height of mountain i > third){
      |                    ^~~~~~
a.cc:11:26: error: expected ')' before 'of'
   11 |                 if(height of mountain i > third){
      |                   ~      ^~~
      |                          )
a.cc:12:34: error: expected ')' before 'of'
   12 |                         if(height of mountain i > second){
      |                           ~      ^~~
      |                                  )
a.cc:13:42: error: expected ')' before 'of'
   13 |                                 if(height of mountain i > first){
      |                                   ~      ^~~
      |                                          )
Language: C++

#include <iostream>
using namespace std;

int main() {
	int first, second, third, input[10];
	first=0;
	second=0;
	third=0;
	cin >> input[0]
	cin >> input[1]
	cin >> input[2]
	cin >> input[3]
	cin >> input[4]
	cin >> input[5]
	cin >> input[6]
	cin >> input[7]
	cin >> input[8]
	cin >> input[9]
	int i;
	for(i=0;i<=10;i++){
		if(input[i] > third){
			if(input[i] > second){
				if(input[i] > first){
					first=input[i];
				}else{
					second=input[i];
				}
			}else{
				third=input[i];
			}
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: expected ';' before 'cin'
    9 |         cin >> input[0]
      |                        ^
      |                        ;
   10 |         cin >> input[1]
      |         ~~~             
a.cc:20:13: error: 'i' was not declared in this scope
   20 |         for(i=0;i<=10;i++){
      |             ^
Language: C++

#include<stdio.h>
int main (void){
    int x1=0,x2=0,x3=0,input,s;
    for(s=0;s<10;s++){
        scanf("%d\n",&input);
        if(x1 < input){
            x3 = x2;
            x2 = x1;
            x1 = input;
        }else{
            if(x2 < input){
                x3 = x2;
                x2 = input;
            }else{
                if(x3 < input){
                    x3 = input;
                }
            }
        }
    }
    printf("%d\n%d\n%d\n",x1,x2,x3);
    return(0);

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

import java.util.Arrays;

class Main {
  public static void main(String[] args) {
    int n = 10, m = 3;
    int[] arr = new int[n];

    for (int i = 0; i < n; i++){
      arr[i] = new java.util.Scanner(System.in).nextInt();
    }

    Arrays.sort(arr);

    for (int i = n - 1; i >= n -m; i--){
      System.out.println(arr[i]);
    }
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:9: error: expected ':' before 'static'
    4 |   public static void main(String[] args) {
      |         ^~~~~~~
      |         :
a.cc:4:27: error: 'String' has not been declared
    4 |   public static void main(String[] args) {
      |                           ^~~~~~
a.cc:4:36: error: expected ',' or '...' before 'args'
    4 |   public static void main(String[] args) {
      |                                    ^~~~
a.cc:18:2: error: expected ';' after class definition
   18 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:8: error: structured binding declaration cannot have type 'int'
    6 |     int[] arr = new int[n];
      |        ^~
a.cc:6:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:8: error: empty structured binding declaration
a.cc:6:11: error: expected initializer before 'arr'
    6 |     int[] arr = new int[n];
      |           ^~~
a.cc:9:7: error: 'arr' was not declared in this scope
    9 |       arr[i] = new java.util.Scanner(System.in).nextInt();
      |       ^~~
a.cc:9:20: error: 'java' does not name a type
    9 |       arr[i] = new java.util.Scanner(System.in).nextInt();
      |                    ^~~~
a.cc:12:5: error: 'Arrays' was not declared in this scope
   12 |     Arrays.sort(arr);
      |     ^~~~~~
a.cc:12:17: error: 'arr' was not declared in this scope
   12 |     Arrays.sort(arr);
      |                 ^~~
a.cc:15:7: error: 'System' was not declared in this scope
   15 |       System.out.println(arr[i]);
      |       ^~~~~~
Language: C++

#include <algorithm>
#include <stdio.h>
using namespace std;


int main()
{
	int i[10];
	cin >> i;
	sort(i, i+10);
	cout << i[1] << endl;
	cout << i[2] << endl;
	cout << i[3] << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> i;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <stdio.h>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << i[1] << endl;
      |         ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:25: error: 'endl' was not declared in this scope
   11 |         cout << i[1] << endl;
      |                         ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <stdio.h>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

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

int main(){

??????vector<int> data;

    for(int i=0;i<10;i++)
    {
       int input;
       cin>>input;
       data.push_back(input);
    }
    
    sort(data.begin,data.end,greater<int>());
    
    for(int i=0,i<3;i++)
    {
       cout<<data[i]<<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |    ^
a.cc:8:5: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |     ^
a.cc:8:6: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |      ^
a.cc:8:19: error: expected primary-expression before 'data'
    8 | ??????vector<int> data;
      |                   ^~~~
a.cc:8:18: error: expected ':' before 'data'
    8 | ??????vector<int> data;
      |                  ^~~~~
      |                  :
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:14:13: error: overloaded function with no contextual type information
   14 |        data.push_back(input);
      |             ^~~~~~~~~
a.cc:17:15: error: overloaded function with no contextual type information
   17 |     sort(data.begin,data.end,greater<int>());
      |               ^~~~~
a.cc:17:26: error: overloaded function with no contextual type information
   17 |     sort(data.begin,data.end,greater<int>());
      |                          ^~~
a.cc:19:18: error: expected ';' before '<' token
   19 |     for(int i=0,i<3;i++)
      |                  ^
      |                  ;
a.cc:19:18: error: expected primary-expression before '<' token
a.cc:21:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   21 |        cout<<data[i]<<endl;
      |                  ^
Language: C++

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

int main(){

??????vector<int> data;

    for(int i=0;i<10;i++)
    {
       int input;
       cin>>input;
       data.push_back(input);
    }
    
    sort(data.begin(),data.end(),greater<int>());
    
    for(int i=0,i<3;i++)
    {
       cout<<data[i]<<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |    ^
a.cc:8:5: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |     ^
a.cc:8:6: error: expected primary-expression before '?' token
    8 | ??????vector<int> data;
      |      ^
a.cc:8:19: error: expected primary-expression before 'data'
    8 | ??????vector<int> data;
      |                   ^~~~
a.cc:8:18: error: expected ':' before 'data'
    8 | ??????vector<int> data;
      |                  ^~~~~
      |                  :
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:8:23: error: expected ':' before ';' token
    8 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:8:23: error: expected primary-expression before ';' token
a.cc:14:13: error: overloaded function with no contextual type information
   14 |        data.push_back(input);
      |             ^~~~~~~~~
a.cc:17:15: error: overloaded function with no contextual type information
   17 |     sort(data.begin(),data.end(),greater<int>());
      |               ^~~~~
a.cc:17:28: error: overloaded function with no contextual type information
   17 |     sort(data.begin(),data.end(),greater<int>());
      |                            ^~~
a.cc:19:18: error: expected ';' before '<' token
   19 |     for(int i=0,i<3;i++)
      |                  ^
      |                  ;
a.cc:19:18: error: expected primary-expression before '<' token
a.cc:21:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   21 |        cout<<data[i]<<endl;
      |                  ^
Language: C++

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

int main(){

??????vector<int> data;

    for(int i=0;i<10;i++)
    {
       int input;
       cin>>input;
       data.push_back(input);
    }
    
    sort(data.begin(),data.end(),greater<int>());
    
    for(int i=0;i<3;i++)
    {
       cout<<data[i]<<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ??????vector<int> data;
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ??????vector<int> data;
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ??????vector<int> data;
      |   ^
a.cc:9:4: error: expected primary-expression before '?' token
    9 | ??????vector<int> data;
      |    ^
a.cc:9:5: error: expected primary-expression before '?' token
    9 | ??????vector<int> data;
      |     ^
a.cc:9:6: error: expected primary-expression before '?' token
    9 | ??????vector<int> data;
      |      ^
a.cc:9:19: error: expected primary-expression before 'data'
    9 | ??????vector<int> data;
      |                   ^~~~
a.cc:9:18: error: expected ':' before 'data'
    9 | ??????vector<int> data;
      |                  ^~~~~
      |                  :
a.cc:9:23: error: expected ':' before ';' token
    9 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:9:23: error: expected primary-expression before ';' token
a.cc:9:23: error: expected ':' before ';' token
    9 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:9:23: error: expected primary-expression before ';' token
a.cc:9:23: error: expected ':' before ';' token
    9 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:9:23: error: expected primary-expression before ';' token
a.cc:9:23: error: expected ':' before ';' token
    9 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:9:23: error: expected primary-expression before ';' token
a.cc:9:23: error: expected ':' before ';' token
    9 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:9:23: error: expected primary-expression before ';' token
a.cc:15:13: error: overloaded function with no contextual type information
   15 |        data.push_back(input);
      |             ^~~~~~~~~
a.cc:18:15: error: overloaded function with no contextual type information
   18 |     sort(data.begin(),data.end(),greater<int>());
      |               ^~~~~
a.cc:18:28: error: overloaded function with no contextual type information
   18 |     sort(data.begin(),data.end(),greater<int>());
      |                            ^~~
a.cc:22:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   22 |        cout<<data[i]<<endl;
      |                  ^
Language: C++

#include<iostream>
#include <vector>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

??????vector<int> data;

    for(int i=0;i<10;i++)
    {
       int input;
       cin>>input;
       data.push_back(input);
    }
    
    sort(data.begin(),data.end(),greater<int>());
    
    for(int i=0;i<3;i++)
    {
       cout<<data[i]<<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '?' token
   10 | ??????vector<int> data;
      | ^
a.cc:10:2: error: expected primary-expression before '?' token
   10 | ??????vector<int> data;
      |  ^
a.cc:10:3: error: expected primary-expression before '?' token
   10 | ??????vector<int> data;
      |   ^
a.cc:10:4: error: expected primary-expression before '?' token
   10 | ??????vector<int> data;
      |    ^
a.cc:10:5: error: expected primary-expression before '?' token
   10 | ??????vector<int> data;
      |     ^
a.cc:10:6: error: expected primary-expression before '?' token
   10 | ??????vector<int> data;
      |      ^
a.cc:10:19: error: expected primary-expression before 'data'
   10 | ??????vector<int> data;
      |                   ^~~~
a.cc:10:18: error: expected ':' before 'data'
   10 | ??????vector<int> data;
      |                  ^~~~~
      |                  :
a.cc:10:23: error: expected ':' before ';' token
   10 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:10:23: error: expected primary-expression before ';' token
a.cc:10:23: error: expected ':' before ';' token
   10 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:10:23: error: expected primary-expression before ';' token
a.cc:10:23: error: expected ':' before ';' token
   10 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:10:23: error: expected primary-expression before ';' token
a.cc:10:23: error: expected ':' before ';' token
   10 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:10:23: error: expected primary-expression before ';' token
a.cc:10:23: error: expected ':' before ';' token
   10 | ??????vector<int> data;
      |                       ^
      |                       :
a.cc:10:23: error: expected primary-expression before ';' token
a.cc:16:13: error: overloaded function with no contextual type information
   16 |        data.push_back(input);
      |             ^~~~~~~~~
a.cc:19:15: error: overloaded function with no contextual type information
   19 |     sort(data.begin(),data.end(),greater<int>());
      |               ^~~~~
a.cc:19:28: error: overloaded function with no contextual type information
   19 |     sort(data.begin(),data.end(),greater<int>());
      |                            ^~~
a.cc:23:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   23 |        cout<<data[i]<<endl;
      |                  ^