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

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

int main(){

??????int data[10];

    for(int i=0;i<10;i++)
    {
       cin>>data[i];
    }
    
    sort(data,data+10,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 | ??????int data[10];
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ??????int data[10];
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ??????int data[10];
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ??????int data[10];
      |    ^
a.cc:8:5: error: expected primary-expression before '?' token
    8 | ??????int data[10];
      |     ^
a.cc:8:6: error: expected primary-expression before '?' token
    8 | ??????int data[10];
      |      ^
a.cc:8:7: error: expected primary-expression before 'int'
    8 | ??????int data[10];
      |       ^~~
a.cc:8:7: error: expected ':' before 'int'
    8 | ??????int data[10];
      |       ^~~
      |       :
a.cc:8:7: error: expected primary-expression before 'int'
    8 | ??????int data[10];
      |       ^~~
a.cc:8:7: error: expected ':' before 'int'
    8 | ??????int data[10];
      |       ^~~
      |       :
a.cc:8:7: error: expected primary-expression before 'int'
    8 | ??????int data[10];
      |       ^~~
a.cc:8:7: error: expected ':' before 'int'
    8 | ??????int data[10];
      |       ^~~
      |       :
a.cc:8:7: error: expected primary-expression before 'int'
    8 | ??????int data[10];
      |       ^~~
a.cc:8:7: error: expected ':' before 'int'
    8 | ??????int data[10];
      |       ^~~
      |       :
a.cc:8:7: error: expected primary-expression before 'int'
    8 | ??????int data[10];
      |       ^~~
a.cc:8:7: error: expected ':' before 'int'
    8 | ??????int data[10];
      |       ^~~
      |       :
a.cc:8:7: error: expected primary-expression before 'int'
    8 | ??????int data[10];
      |       ^~~
a.cc:8:7: error: expected ':' before 'int'
    8 | ??????int data[10];
      |       ^~~
      |       :
a.cc:8:7: error: expected primary-expression before 'int'
    8 | ??????int data[10];
      |       ^~~
a.cc:12:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   12 |        cin>>data[i];
      |                 ^
a.cc:15:19: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator+'
   15 |     sort(data,data+10,greater<int>());
      |               ~~~~^~~
a.cc:19:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   19 |        cout<<data[i]<<endl;
      |                  ^
Language: C++

#include<iostream>

using namespace std;

int main(){

??????int data[10];

    for(int i=0;i<10;i++)
    {
       cin>>data[i];
    }
    
    
    for(int i=0;i<3;i++)
    {
       cout<<data[i]<<endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ??????int data[10];
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ??????int data[10];
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ??????int data[10];
      |   ^
a.cc:7:4: error: expected primary-expression before '?' token
    7 | ??????int data[10];
      |    ^
a.cc:7:5: error: expected primary-expression before '?' token
    7 | ??????int data[10];
      |     ^
a.cc:7:6: error: expected primary-expression before '?' token
    7 | ??????int data[10];
      |      ^
a.cc:7:7: error: expected primary-expression before 'int'
    7 | ??????int data[10];
      |       ^~~
a.cc:7:7: error: expected ':' before 'int'
    7 | ??????int data[10];
      |       ^~~
      |       :
a.cc:7:7: error: expected primary-expression before 'int'
    7 | ??????int data[10];
      |       ^~~
a.cc:7:7: error: expected ':' before 'int'
    7 | ??????int data[10];
      |       ^~~
      |       :
a.cc:7:7: error: expected primary-expression before 'int'
    7 | ??????int data[10];
      |       ^~~
a.cc:7:7: error: expected ':' before 'int'
    7 | ??????int data[10];
      |       ^~~
      |       :
a.cc:7:7: error: expected primary-expression before 'int'
    7 | ??????int data[10];
      |       ^~~
a.cc:7:7: error: expected ':' before 'int'
    7 | ??????int data[10];
      |       ^~~
      |       :
a.cc:7:7: error: expected primary-expression before 'int'
    7 | ??????int data[10];
      |       ^~~
a.cc:7:7: error: expected ':' before 'int'
    7 | ??????int data[10];
      |       ^~~
      |       :
a.cc:7:7: error: expected primary-expression before 'int'
    7 | ??????int data[10];
      |       ^~~
a.cc:7:7: error: expected ':' before 'int'
    7 | ??????int data[10];
      |       ^~~
      |       :
a.cc:7:7: error: expected primary-expression before 'int'
    7 | ??????int data[10];
      |       ^~~
a.cc:11:17: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   11 |        cin>>data[i];
      |                 ^
a.cc:17:18: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   17 |        cout<<data[i]<<endl;
      |                  ^
Language: C++

#include <iostream>

using namespace std;

int main () {
	int takasa[10];

	for (int i = 0; i < 10; i++) {
		cin >> takasa[i];
	}

	//????????????(?????¬????????§???????????????
	/*for (int i = 0; i < 9; i++) {
		for (int j = i+1; j < 10; j++) {
			if (takasa[i] < takasa[j])  {
				swap(takasa[i], takasa[j]);
			}
		}
    }*/

	sort(&takasa[0], &takasa[10]);

	for (int i = 0; i < 3; i++) {
		cout << takasa[9-i] << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   21 |         sort(&takasa[0], &takasa[10]);
      |         ^~~~
      |         short
Language: C++

#include <iostream>
#include <array>
#include <functional>



using namespace std;

int main(){
	array<int,10> list;
	for (int i = 0; i < 10; i++){
		cin >> list[i];
	}
	sort(list.begin(), list.end(),greater<int>());
	for (int i = 0; i < 3; i++){
		cout << list[i] << endl;
	}
	return 0;
}

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

#include <iostream>
using nameplace std;
int main(){
   int h[10];
 for(int i=0;i<10;i++){
      cin>>h[i];
 }
 for(int i=0;i<10;i++){
  for(int j=0;j<10-i;j++){
        if(h[j]<h[j+1]){
          swap(h[j],h[j+1]);
         }
      }
}
cout<<h[0]<<endl;
cout<<h[1]<<endl;
cout<<h[2]<<endl;
return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameplace'
    2 | using nameplace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |       cin>>h[i];
      |       ^~~
      |       std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:11: error: 'swap' was not declared in this scope
   11 |           swap(h[j],h[j+1]);
      |           ^~~~
a.cc:11:11: note: suggested alternatives:
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/tuple:2823:5: note:   'std::swap'
 2823 |     swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
      |     ^~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
/usr/include/c++/14/bits/exception_ptr.h:229:5: note:   'std::__exception_ptr::swap'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 | cout<<h[0]<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 | cout<<h[0]<<endl;
      |             ^~~~
      |             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
using nameplace std;
int main(){
   int h[10];
 for(int i=0;i<10;i++){
      cin>>h[i];
 }
 for(int k=0;i<10;i++){
  for(int j=0;j<10-i;j++){
        if(h[j]<h[j+1]){
          swap(h[j],h[j+1]);
         }
      }
}
cout<<h[0]<<endl;
cout<<h[1]<<endl;
cout<<h[2]<<endl;
return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameplace'
    2 | using nameplace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |       cin>>h[i];
      |       ^~~
      |       std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:14: error: 'i' was not declared in this scope
    8 |  for(int k=0;i<10;i++){
      |              ^
a.cc:11:11: error: 'swap' was not declared in this scope
   11 |           swap(h[j],h[j+1]);
      |           ^~~~
a.cc:11:11: note: suggested alternatives:
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/tuple:2823:5: note:   'std::swap'
 2823 |     swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete;
      |     ^~~~
In file included from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
  226 |     swap(_Tp& __a, _Tp& __b)
      |     ^~~~
/usr/include/c++/14/bits/move.h:226:5: note:   'std::swap'
/usr/include/c++/14/bits/exception_ptr.h:229:5: note:   'std::__exception_ptr::swap'
  229 |     swap(exception_ptr& __lhs, exception_ptr& __rhs)
      |     ^~~~
a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 | cout<<h[0]<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:15:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 | cout<<h[0]<<endl;
      |             ^~~~
      |             std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
int top[5]={0,0,0,0,0};
int yama;

cin >> top[0];

for(int i=0; i<9; i++){
 cin >> yama;

 for(int j=0; j<3; j++){
  if(yama >top[j]){
   top[j+2] = top[j+1]
   top[j+1] = top[j]
   top[j] =yama;
   break;
  }
 }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: expected ';' before 'top'
   14 |    top[j+2] = top[j+1]
      |                       ^
      |                       ;
   15 |    top[j+1] = top[j]
      |    ~~~                 
a.cc:21:2: error: expected '}' at end of input
   21 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main() {
int top[5]={0,0,0,0,0};
int yama;

cin >> top[0];

for(int i=0; i<9; i++){
 cin >> yama;

 for(int j=0; j<3; j++){
  if(yama >top[j]){
   top[j+2] = top[j+1];
   top[j+1] = top[j];
   top[j] =yama;
   break;
  }
 }
 return 0;
}

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

var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: {},
});

hs = [];

rl.on('line', function(h) {
    hs.push(h | 0);
});

rl.on('close', function() {
    console.log(3776);
    console.log(2848);
    console.log(2840);
});

Compiler output:
a.cc:1:24: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    1 | var readline = require('readline');
      |                        ^~~~~~~~~~
a.cc:10:7: warning: multi-character character constant [-Wmultichar]
   10 | rl.on('line', function(h) {
      |       ^~~~~~
a.cc:14:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   14 | rl.on('close', function() {
      |       ^~~~~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var readline = require('readline');
      | ^~~
a.cc:3:1: error: 'var' does not name a type
    3 | var rl = readline.createInterface({
      | ^~~
a.cc:6:2: error: expected unqualified-id before ')' token
    6 | });
      |  ^
a.cc:8:1: error: 'hs' does not name a type
    8 | hs = [];
      | ^~
a.cc:10:1: error: 'rl' does not name a type
   10 | rl.on('line', function(h) {
      | ^~
a.cc:12:2: error: expected unqualified-id before ')' token
   12 | });
      |  ^
a.cc:14:1: error: 'rl' does not name a type
   14 | rl.on('close', function() {
      | ^~
a.cc:18:2: error: expected unqualified-id before ')' token
   18 | });
      |  ^
Language: C++

#include <iostream>
#include <algorithm>
#include <c++/array>

using namespace std;

int main() {
    array<int, 10> A;
    for (int i = 0; i < 10; ++i) {
        cin >> A[i];
    }

    sort(A.begin(), A.end(), std::greater<int>());

    for (int i = 0; i < 3; ++i) {
        cout << A[i] << endl;
    }

    return 0;
}

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

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

#define N 10

void hoge(){
	int i;
	int h[N];
	for(i=0;i<N;i++){
	 cin>>h[i];
	}
	sort(h);
	
	cout<<h[9]<<h[8]<<h[7]<<endl;
}

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

Compiler output:
a.cc: In function 'void hoge()':
a.cc:13:13: error: no matching function for call to 'sort(int [10])'
   13 |         sort(h);
      |         ~~~~^~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 1 provided
Language: C++

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

int main(){
	int h = 0,m = 0,l = 0,tmp,i;

	for(i = 0;i < 9;i++){
		cin>>tmp;
		if(tmp > h){
			l = m;
			m = h;
			h = tmp;
		}else if(tmp > m){
			l = m;
			m = tmp;
		}else if(tmp > l){
			l = tmp;
		}
	}
	cout<<h<<endl;
	cout<<m<<endl;
	cout<<l<<endl;
	}
	return 0;
}

Compiler output:
a.cc:24:9: error: expected unqualified-id before 'return'
   24 |         return 0;
      |         ^~~~~~
a.cc:25:1: error: expected declaration before '}' token
   25 | }
      | ^
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,greater<int>());
        for(i=0;i<3;i++) cout << a[i] << endl;
        return 0;
}
~                                                                                                                                                                                    
~                                                                                                                                                                                    
~  

Compiler output:
a.cc:13:1: error: expected class-name before '~' token
   13 | ~
      | ^
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:12:1: error: expected class-name before '~' token
   12 | ~
      | ^
Language: C++

i = 0
while i < 10 do
 a[i] = gets
 i = i + 1
end

b = a.map(&:to_i).sort
puts b[0]
puts b[1]
puts b[2]

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i = 0
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int yama[10], i, p, Flag = 0, t;
	for(i = 0; i < 10; i++)
		cin >> yama[i];
	while(1){
		Flag = 0;
		for(i = 0; i < 10; i++){
			if(yama[i] < yama[i + 1]){
				t = yama[i];
				yama[i] = yama[i + 1];
				yama[i + 1] = t;
				Flag++;
			}
		}
		if(Flag != 0)
			break;
	}
	cout << yama[1] << "\n"
	cout << yama[2] << "\n"
	cout << yama[3] << "\n"
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:32: error: expected ';' before 'cout'
   21 |         cout << yama[1] << "\n"
      |                                ^
      |                                ;
   22 |         cout << yama[2] << "\n"
      |         ~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int a[10];
    for(int i = 0; i < 10; i++){
        cin >> a[i];
    }
    
    sort(a, a + 10,greater<int>());
    
    cout << a[0] << endl;
    cout << a[1] << endl;
    cout << a[2] << endl;

}

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

#include <iostream>
using namespace std;

int main(){

unsigned short mt_list[10];

for(int i=0; i<10;i++){
cin >> mt_list[i];
}

unsgined short high[3] = {0};
for(int h=0; h<3; h++){
for(int i=0; i<10; i++){
if(high[h] >= mt_list[i]){
high[h] = i;
}
}
unsigned short tmp = high[h];
high[h] = mt_list[tmp];
mt_list[tmp] = 0;
}

for(int i=0; i<3; i++){
cout << high[i] << endl;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'unsgined' was not declared in this scope; did you mean 'unsigned'?
   12 | unsgined short high[3] = {0};
      | ^~~~~~~~
      | unsigned
a.cc:15:4: error: 'high' was not declared in this scope
   15 | if(high[h] >= mt_list[i]){
      |    ^~~~
a.cc:19:22: error: 'high' was not declared in this scope
   19 | unsigned short tmp = high[h];
      |                      ^~~~
a.cc:25:9: error: 'high' was not declared in this scope
   25 | cout << high[i] << endl;
      |         ^~~~
Language: C++

import sys

arr = []
for i in sys.stdin:
    arr.append(int(i))

arr.sort()
arr.reverse()
for i in range(3):
    print(arr[i])

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

lis=[];

for i in range(10):
    h=int(input());
    lis.append(h);
    
for i in range(10):
    for j in range(10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
            
for i in range(3):
    print(lis[i]);

Compiler output:
a.cc:1:1: error: 'lis' does not name a type
    1 | lis=[];
      | ^~~
a.cc:3:1: error: expected unqualified-id before 'for'
    3 | for i in range(10):
      | ^~~
a.cc:5:5: error: 'lis' does not name a type
    5 |     lis.append(h);
      |     ^~~
a.cc:7:1: error: expected unqualified-id before 'for'
    7 | for i in range(10):
      | ^~~
a.cc:11:13: error: 'lis' does not name a type
   11 |             lis[i]=lis[j];
      |             ^~~
a.cc:12:13: error: 'lis' does not name a type
   12 |             lis[j]=a;
      |             ^~~
a.cc:14:1: error: expected unqualified-id before 'for'
   14 | for i in range(3):
      | ^~~
Language: C++

lis=[];

for i in range(10):
    h=int(input());
    lis.append(h);
    
for i in range(10):
    for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
            
for i in range(3):
    print(lis[i]);

Compiler output:
a.cc:1:1: error: 'lis' does not name a type
    1 | lis=[];
      | ^~~
a.cc:3:1: error: expected unqualified-id before 'for'
    3 | for i in range(10):
      | ^~~
a.cc:5:5: error: 'lis' does not name a type
    5 |     lis.append(h);
      |     ^~~
a.cc:7:1: error: expected unqualified-id before 'for'
    7 | for i in range(10):
      | ^~~
a.cc:11:13: error: 'lis' does not name a type
   11 |             lis[i]=lis[j];
      |             ^~~
a.cc:12:13: error: 'lis' does not name a type
   12 |             lis[j]=a;
      |             ^~~
a.cc:14:1: error: expected unqualified-id before 'for'
   14 | for i in range(3):
      | ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
 int mountain,first=0,second=0,third=0;
 for(int i=0;i<10;i++){
  cin>>mountain;
  if(mountain>first){
   third=second;
   second=first;
   first=mountain;
  }else if(mountain>second){
   third=second;
   second=mountain;
  }else if(mountain>third){
   third=mountain;
  }
 }
 count<<first<<'\n'<<second<<'\n'<<third;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: 'count' was not declared in this scope
   19 |  count<<first<<'\n'<<second<<'\n'<<third;
      |  ^~~~~
Language: C++

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

int main()
{
	int high[10];
	int i = 0;
	
	while (i < 10){
		cin >> high[i];
		i++;
	}
	
	i = 0;
	
	reverse(high[i], high[i + 9]);
	
	while (i < 3){
		cout << high[i] << endl;
	}
	
	return (0);
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::reverse(_BIter, _BIter) [with _BIter = int]':
a.cc:17:9:   required from here
   17 |         reverse(high[i], high[i + 9]);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:1089:63: error: no matching function for call to '__iterator_category(int&)'
 1089 |       std::__reverse(__first, __last, std::__iterator_category(__first));
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:65,
                 from /usr/include/c++/14/algorithm:60:
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note: candidate: 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&)'
  239 |     __iterator_category(const _Iter&)
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_iterator_base_types.h: In substitution of 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&) [with _Iter = int]':
/usr/include/c++/14/bits/stl_algo.h:1089:63:   required from 'void std::reverse(_BIter, _BIter) [with _BIter = int]'
 1089 |       std::__reverse(__first, __last, std::__iterator_category(__first));
      |                                       ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
a.cc:17:9:   required from here
   17 |         reverse(high[i], high[i + 9]);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: error: no type named 'iterator_category' in 'struct std::iterator_traits<int>'
  239 |     __iterator_category(const _Iter&)
      |     ^~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
int H[10];
int main() {
	for (int i = 0; i < 10; i++) {
		cin >> H[i];
	}
	sort(H.rbegin(), H.rend());
	for (int i = 0; i <3 ; i++) {
		cout << H[i] << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: request for member 'rbegin' in 'H', which is of non-class type 'int [10]'
   20 |         sort(H.rbegin(), H.rend());
      |                ^~~~~~
a.cc:20:28: error: request for member 'rend' in 'H', which is of non-class type 'int [10]'
   20 |         sort(H.rbegin(), H.rend());
      |                            ^~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int x[1000];
int temp[1000];
void MargeSort(int x[],int left,int right){
    int i,j,mid,k;
    if(left>=right)return;
    mid=(left+right)/2;
    MargeSort(x,left,mid);
    MargeSort(x,mid+1,right);
    for(i=left;i<=mid;i++){
        temp[i]=x[i];
    }
    for(i=mid+1,j=right;i<=right;i++,j--){
        temp[i]=x[j];
    }
    i=left; j=right;
    for(k=left;k<=right;k++){
        if(temp[i]>=temp[j])x[k]=temp[i++];
        else x[k]=temp[j--];
    }
}

int main(){
    int num=10
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    MargeSort(x,0,num-1);
    for(int i=0;i<3;i++){
        cout<<x[i]<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:5: error: expected ',' or ';' before 'for'
   28 |     for(int i=0;i<num;i++){
      |     ^~~
a.cc:28:17: error: 'i' was not declared in this scope
   28 |     for(int i=0;i<num;i++){
      |                 ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int x[1000];
int temp[1000];
void MargeSort(int x[],int left,int right){
    int i,j,mid;
    if(left>=right)return;
    mid=(left+right)/2;
    MargeSort(x,left,mid);
    MargeSort(x,mid+1,right);
    for(int i=left;i<=mid;i++){
        temp[i]=x[i];
    }
    for(int i=mid+1,int j=right;i<=right;i++,j--){
        temp[i]=x[j];
    }
    i=left; j=right;
    for(k=left;k<=right;k++){
        if(int temp[i]>=temp[j])x[k]=temp[i++];
        else x[k]=temp[j--];
    }
}

int main(){
    int num=10;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    MargeSort(x,0,num-1);
    for(int i=0;i<3;i++){
        cout<<x[i]<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'void MargeSort(int*, int, int)':
a.cc:16:21: error: expected unqualified-id before 'int'
   16 |     for(int i=mid+1,int j=right;i<=right;i++,j--){
      |                     ^~~
a.cc:16:21: error: expected ';' before 'int'
   16 |     for(int i=mid+1,int j=right;i<=right;i++,j--){
      |                     ^~~
      |                     ;
a.cc:16:41: error: expected ')' before ';' token
   16 |     for(int i=mid+1,int j=right;i<=right;i++,j--){
      |        ~                                ^
      |                                         )
a.cc:16:49: error: expected ';' before ')' token
   16 |     for(int i=mid+1,int j=right;i<=right;i++,j--){
      |                                                 ^
      |                                                 ;
a.cc:20:9: error: 'k' was not declared in this scope
   20 |     for(k=left;k<=right;k++){
      |         ^
a.cc:21:16: error: condition declares an array
   21 |         if(int temp[i]>=temp[j])x[k]=temp[i++];
      |                ^~~~
Language: C++

#include<iostream>
using namespace std;
int main() {
	int yama[9];
	int x,y,z.a;
	for(x=0; x<10; x++) {
		cin >> yama[x];
	}
	for(y=0;y<10000; y++) {
		if(yama[y] > yama[y+1]) {
			z = yama[y];
			yama[y] = yama[y+1];
			yama[y+1] = z;
		}
		else {
			a++;
		}
		if(y == 8) {
			if(a == 9) {
				break;
			}
			else {
				y = 0;
				a = 0;
			}
		}
	}
	cout << yama[9] << endl;
	cout << yama[8] << endl;
	cout << yama[7] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: expected initializer before '.' token
    5 |         int x,y,z.a;
      |                  ^
a.cc:11:25: error: 'z' was not declared in this scope
   11 |                         z = yama[y];
      |                         ^
a.cc:16:25: error: 'a' was not declared in this scope
   16 |                         a++;
      |                         ^
a.cc:19:28: error: 'a' was not declared in this scope
   19 |                         if(a == 9) {
      |                            ^
Language: C++

#include <cstdio>
int main(){
 int top3[3];
 int i,tmp;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top[i]);
};
 

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'data' was not declared in this scope
    6 |   scanf("%d",&data);
      |               ^~~~
a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'tmp'?
   22 |     printf("%d\n",top[i]);
      |                   ^~~
      |                   tmp
Language: C++

#include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top[i]);
};
 

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'tmp'?
   22 |     printf("%d\n",top[i]);
      |                   ^~~
      |                   tmp
Language: C++

#include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<3;i++) top3[i]=0;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top[i]);
};
 

Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: 'top' was not declared in this scope; did you mean 'tmp'?
   23 |     printf("%d\n",top[i]);
      |                   ^~~
      |                   tmp
Language: C++

#include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<3;i++) top3[i]=0;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top[i]);
 return 0;
};
 

Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: 'top' was not declared in this scope; did you mean 'tmp'?
   23 |     printf("%d\n",top[i]);
      |                   ^~~
      |                   tmp
Language: C++

#include <iostream>
using namespace std;

int main(){

int[3] top = {0,0,0};

while(cin.peek != EOF){
int h;
cin >> h;
if(h > top[2]){
top[2] = h;
if(h > top[1]){
top[2] = top[1];
top[1] = h;
if(h > top[0]){
top[1]=top[0];
top[0]=h;
}
}
}

}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected identifier before numeric constant
    6 | int[3] top = {0,0,0};
      |     ^
a.cc:6:5: error: expected ']' before numeric constant
    6 | int[3] top = {0,0,0};
      |     ^
      |     ]
a.cc:6:4: error: structured binding declaration cannot have type 'int'
    6 | int[3] top = {0,0,0};
      |    ^
a.cc:6:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:4: error: empty structured binding declaration
a.cc:6:8: error: expected initializer before 'top'
    6 | int[3] top = {0,0,0};
      |        ^~~
a.cc:8:11: error: invalid use of member function 'std::basic_istream<_CharT, _Traits>::int_type std::basic_istream<_CharT, _Traits>::peek() [with _CharT = char; _Traits = std::char_traits<char>; int_type = int]' (did you forget the '()' ?)
    8 | while(cin.peek != EOF){
      |       ~~~~^~~~
      |               ()
a.cc:11:8: error: 'top' was not declared in this scope
   11 | if(h > top[2]){
      |        ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){

int[3] top = {0,0,0};

while(cin.peek != EOF){

int h;
cin >> h;

if(h > top[2]){
top[2] = h;
if(h > top[1]){
top[2] = top[1];
top[1] = h;
if(h > top[0]){
top[1]=top[0];
top[0]=h;
}
}
}

}

cout << top[0] << endl << top[1] << endl << top[2] << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected identifier before numeric constant
    6 | int[3] top = {0,0,0};
      |     ^
a.cc:6:5: error: expected ']' before numeric constant
    6 | int[3] top = {0,0,0};
      |     ^
      |     ]
a.cc:6:4: error: structured binding declaration cannot have type 'int'
    6 | int[3] top = {0,0,0};
      |    ^
a.cc:6:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:6:4: error: empty structured binding declaration
a.cc:6:8: error: expected initializer before 'top'
    6 | int[3] top = {0,0,0};
      |        ^~~
a.cc:8:11: error: invalid use of member function 'std::basic_istream<_CharT, _Traits>::int_type std::basic_istream<_CharT, _Traits>::peek() [with _CharT = char; _Traits = std::char_traits<char>; int_type = int]' (did you forget the '()' ?)
    8 | while(cin.peek != EOF){
      |       ~~~~^~~~
      |               ()
a.cc:13:8: error: 'top' was not declared in this scope
   13 | if(h > top[2]){
      |        ^~~
a.cc:27:9: error: 'top' was not declared in this scope
   27 | cout << top[0] << endl << top[1] << endl << top[2] << endl;
      |         ^~~
Language: C++

#include<iostream>

int main(){
	int f=0,s=0,t=0,num,tmp;
	
	for(int i=0;i<10;i++){
		cin>>num;
		if(num>t){
			t=num;
		}
		if(t>s){
			tmp=s;
			s=t;
			t=tmp;
		}
		if(s>f){
			tmp=f;
			f=s;
			s=tmp;
		}
		
	}
	cout << f << endl << s << endl << t << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |                 cin>>num;
      |                 ^~~
      |                 std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:23:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |         cout << f << endl << s << endl << t << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:23:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |         cout << f << endl << s << endl << t << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>

int main(){
	int height[10], rank[3] = {0};
	int i;
	
	for(i = 0; i < 10; i++){
    	scanf("%d", height[i]);

        if (rank[0] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = rank[0];
        	rank[0] = height[i];
        }else if (rank[1] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = height[i];
        }else if (rank[2] < height[i]){
        	rank[2] = height[i];
        }
    }

    for(i = 0; i < 3; i++){
    	printf("%d\n", rank[i])
    }

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:32: error: expected ';' before '}' token
   23 |         printf("%d\n", rank[i])
      |                                ^
      |                                ;
   24 |     }
      |     ~
Language: C++

#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>

using namespace std;

int main() {
	int h[10] = { 0 };

	for (int i = 0; i < 10; i++)
	{
		scanf_s("%d", &h[i]);
		//printf("%d\n", h[i]);
	}

	sort(h, h + 10, std::greater<int>());
	for (int i = 0; i < 3; i++)
	{
		printf("%d\n", h[i]);
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   13 |                 scanf_s("%d", &h[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

int height[10];

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

void sorting(){
    for(int numb = 0; numb < 9; numb++){
        for(int num = 0; num < 9-numb; num++){
            if(height[num] < height[num+1]){
                int stock = height[num];
                height[num] = height[num+1];
                height[num+1] = stock;
            }
        }
    }
}

int main(){
  scan();
  sorting();
  for(int a = 0; a < 3; a++){
    printf("Height%d: %d\n", a, height[a]); 
  }
  return 0;
}

Compiler output:
a.cc: In function 'void scan()':
a.cc:5:5: error: 'scanf' was not declared in this scope; did you mean 'scan'?
    5 |     scanf("%d", &height[i]);
      |     ^~~~~
      |     scan
a.cc: In function 'int main()':
a.cc:25:5: error: 'printf' was not declared in this scope
   25 |     printf("Height%d: %d\n", a, height[a]);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int height[10];
Language: C++

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

int main() {
	int a;
	vector<int> v;
	while (cin >> a) {
		v.push_back(a);
	}
	sort(a.begin(), a.end(), greater<int>());
	
	cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: request for member 'begin' in 'a', which is of non-class type 'int'
   11 |         sort(a.begin(), a.end(), greater<int>());
      |                ^~~~~
a.cc:11:27: error: request for member 'end' in 'a', which is of non-class type 'int'
   11 |         sort(a.begin(), a.end(), greater<int>());
      |                           ^~~
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(a.begin(), a.end(), greater<int>());
      |         ^~~~
      |         short
a.cc:13:18: error: invalid types 'int[int]' for array subscript
   13 |         cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n";
      |                  ^
a.cc:13:34: error: invalid types 'int[int]' for array subscript
   13 |         cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n";
      |                                  ^
a.cc:13:50: error: invalid types 'int[int]' for array subscript
   13 |         cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n";
      |                                                  ^
Language: C++

#include<iostream>
using namespace std;

int main() {
  int array[10], tmp;

  for (int i = 0; i < 10; i++) {
    cin >> array[i];
  }

  for(int j = 0; i < 10; j++) {
    for(int k = 0; k < 9; k++) {
      if (array[k] < array[k+1]) {
        tmp = array[k];
        array[k] = array[k+1];
        array[k+1] = tmp;
      }
    }
  }

  for(int l = 0; l < 3; l++) {
    cout << array[l] << endl;
  }

  return 0;
}

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

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

int main() {
	int m[10];
	for(int i=0; i<9; i++) cin >> m[i];
	sort(a, a+10);
	for(int i=9; i>6; i++) cout << m[i] << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'a' was not declared in this scope
    8 |         sort(a, a+10);
      |              ^
Language: C++

include <stdio.h>
 	int main() {
	cin>>a>>b;
 	int a,b;
 	1=1<a+b<10
	2=10<a+b<100
	3=100<a+b<1000
	cout<<a<<b;
} 

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C++

#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;


int main() {
	vector<int>nums(10);
	for (int i = 0; i < N; ++i) {
		cin >> nums[i];
	}
	sort(nums.begin(), nums.end(), greater<int>());
	for (int i = 0; i < 3; ++i) {
		cout << nums[i] << endl;
	}
	return 0;
}

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

#include "0001.hpp"
#include<iostream>
using namespace std;
#include<algorithm>

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

Compiler output:
a.cc:1:10: fatal error: 0001.hpp: No such file or directory
    1 | #include "0001.hpp"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'i' was not declared in this scope
   12 |         cout<<a[9-i];
      |                   ^
Language: C++

#include <iostream>
#include <queue>

int main() {
  priority_queue<int> q;
  int c;
  for (int i = 0; i < 10; ++i) {
    cin >> c;
    q.push(c);
  }
  for (int i = 0; i < 3; ++i) {
    cout << q.top() << endl;
    q.pop();
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'priority_queue' was not declared in this scope; did you mean 'std::priority_queue'?
    5 |   priority_queue<int> q;
      |   ^~~~~~~~~~~~~~
      |   std::priority_queue
In file included from /usr/include/c++/14/queue:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_queue.h:496:11: note: 'std::priority_queue' declared here
  496 |     class priority_queue
      |           ^~~~~~~~~~~~~~
a.cc:5:18: error: expected primary-expression before 'int'
    5 |   priority_queue<int> q;
      |                  ^~~
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin >> c;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:5: error: 'q' was not declared in this scope
    9 |     q.push(c);
      |     ^
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << q.top() << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:13: error: 'q' was not declared in this scope
   12 |     cout << q.top() << endl;
      |             ^
a.cc:12:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout << q.top() << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
 using namespace std;
int main(){
int input;
int first;
int second;
int third;

for(int i,i<10,i++){
cin>>input;
if(first<input){
 first = input;
}else if(second<input){
 second = input;
}else if(third<input){
 third = input;
}


}
cout<<first<<endl<<second<<endl<<third;<<endl;
return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before '<' token
    9 | for(int i,i<10,i++){
      |            ^
      |            ;
a.cc:9:12: error: expected primary-expression before '<' token
a.cc:9:19: error: expected ';' before ')' token
    9 | for(int i,i<10,i++){
      |                   ^
      |                   ;
a.cc:21:40: error: expected primary-expression before '<<' token
   21 | cout<<first<<endl<<second<<endl<<third;<<endl;
      |                                        ^~