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

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int x[10001],i;
    for(i=0;0<=i && i<=10000;++i){
        cin>>x[i];
    }
    sort(x);
    cout<<x[0]<<endl;
    cout<<x[1]<<endl;
    cout<<x[2]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: no matching function for call to 'sort(int [10001])'
    9 |     sort(x);
      |     ~~~~^~~
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 <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
    int x[10],i;
    for(i=0;0<=i && i<10;++i){
        cin>>x[i];
           }
    sort(x);
    cout<<x[0]<<endl;
    cout<<x[1]<<endl;
    cout<<x[2]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: no matching function for call to 'sort(int [10])'
   10 |     sort(x);
      |     ~~~~^~~
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 <iostream>
#include <algorithm>
using namespace std;

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

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

#include<iostream>
using namespace std;
int main()
{
int i,h,m1,m2,m3;
m1=0;
m2=0;
m3=0;
for(i=0;i<10;i++)
{
	cin>>h;
	if(h>m1)
	{
		m3=m2;
		m2=m1; 
		m1=h;
	}
	else if(h>m2)
	{
		m3=m2;
		m2=h;
	}
	else if(h>m3)
	{
		m3=h;
	}
}
cout<<m1<<endl;
cout<<m2<<endl;
cout<<m3;
return 0
}

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

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

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

#include <iostream>
using namespace std;

#define INPUTSIZE 10

int main() {
    int inputs[INPUTSIZE];
    for (int i = 0; i < INPUTSIZE; i++) cin >> inputs[i];

    sort(inputs, inputs + INPUTSIZE);

    for (int i = 1; i <= 3; i++) cout << inputs[INPUTSIZE - i] << endl;

    return 0;
}

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

/*
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001
 */
#include <iostream>
#include <vector>
#define COUNT 10

using namespace	std;

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

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

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

int main() {
    std::vector<int> hills;
    for (int i = 0; i < 10; i++) {
        std::cout << i << std::endl;
        std::string input;
        std::cin >> input;
        int height = std::atoi(input.c_str());
        hills.push_back(height);
    }

    std::sort(hills.begin(), hills.end(), std::greater<int>());
    for (int i = 0; i < 3; i++) {
        std::cout << hills[i] << std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   15 |     std::sort(hills.begin(), hills.end(), std::greater<int>());
      |          ^~~~
      |          qsort
Language: C++

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

int main() {
    std::vector<int> hills;
    for (int i = 0; i < 10; i++) {
        std::cout << i << std::endl;
        std::string input;
        std::cin >> input;
        int height = std::stoi(input);
        hills.push_back(height);
    }

    std::sort(hills.begin(), hills.end(), std::greater<int>());
    for (int i = 0; i < 3; i++) {
        std::cout << hills[i] << std::endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   15 |     std::sort(hills.begin(), hills.end(), std::greater<int>());
      |          ^~~~
      |          qsort
Language: C++

#include <cstdio>
#include <algorithm>
using namespace std;
int reverse(int x,int y){
    return x>y;
}

int main(){
    int i;
    int mount[10];
    int *p=&mount[0];
    for(i=0;i<10;i++){
        scanf("%d\n",p);
        p++;
    }
    sort(mount,mount+10,reverse(x,y));
    printf("%d\n%d\n%d\n",mount[0],mount[1],mount[2]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: 'x' was not declared in this scope
   16 |     sort(mount,mount+10,reverse(x,y));
      |                                 ^
a.cc:16:35: error: 'y' was not declared in this scope
   16 |     sort(mount,mount+10,reverse(x,y));
      |                                   ^
Language: C++

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

int h[9]

int main(){
  for(i=0;i<=9;i++){
    cin>>h[i];
  }

  sort(h, h+10, greater<int>());

  cout<<h[0]<<h[1]<<h[2];

  return 0;
}

Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int main(){
      | ^~~
Language: C++

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

int main(){
  int h[9]
  for(int i=0;i<=9;i++){
    cin>>h[i];
  }

  sort(h, h+10, greater<int>());

  cout<<h[0]<<h[1]<<h[2];

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'for'
    6 |   for(int i=0;i<=9;i++){
      |   ^~~
a.cc:6:15: error: 'i' was not declared in this scope
    6 |   for(int i=0;i<=9;i++){
      |               ^
a.cc:10:8: error: 'h' was not declared in this scope
   10 |   sort(h, h+10, greater<int>());
      |        ^
Language: C++

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

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

  sort(h, h+10);

  printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'a' was not declared in this scope
   13 |   printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
      |                         ^
Language: C++

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

int main(void){
    int i;
    vector<int> v;
    while(getline(cin, num)){
        v.push_back(num);
    }
    sort(v.begin(), v.end());
    for(int i = 1; i < 4; i++){
        cout << v[v.size - i] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: 'num' was not declared in this scope; did you mean 'enum'?
    9 |     while(getline(cin, num)){
      |                        ^~~
      |                        enum
a.cc:14:21: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
   14 |         cout << v[v.size - i] << endl;
      |                   ~~^~~~
      |                         ()
Language: C++

import scala.io.Source

object Main extends App {
  val src = Source.io.stdin.getLines.map(_.toInt).toList
  val top3: List[Int] = src.sortWith(_<_).take(3)
  top3.map(println)
}

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

#include<iostream>
#include <vector>
#define REP(i,n) for(int i=0;i<(int)n;++i)
#define REPI(i,a,b) for(int i=(int)a;i<(int)b;++i)
using namespace std;

void solver() {
    vector<int> m;
    REP(i,10){
        int n;
        cin>>n;
        m.push_back(n);
    }
    sort(m.begin(),m.end(),greater<int>());
    REP(i,3){
        cout<<m[i]<<endl;
    }
}

int main() {
    solver();
}

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

#include<iostream>
#include <vector>
#define REP(i,n) for(int i=0;i<(int)n;++i)

using namespace std;

void solver() {
    vector<int> m;
    REP(i,10){
        int n;
        cin>>n;
        m.push_back(n);
    }
    sort(m.begin(),m.end(),greater<int>());
    REP(i,3){
        cout<<m[i]<<endl;
    }
}

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

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

#include<iostream>
using namespace std;

int main(){
	int first = 0;
	int second = 0;
	int third = 0;

	for(int i = 0; i < 10; i++){
		int num;

		if(first <= num){
			third = second;
			second = first;
			first = num;
		}else if((second <= num) && (num < first) ){
			thid = second;
			second = num;
		}else if((third <= num) && (num < second)){
			third = num;
		}else{
			//???????????????
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'thid' was not declared in this scope; did you mean 'third'?
   17 |                         thid = second;
      |                         ^~~~
      |                         third
Language: C++

#include<iostream>
using namespace std;

int main(){
	int first = 0;
	int second = 0;
	int third = 0;

	for(int i = 0; i < 10; i++){
		int num;

		cin >> num;

		if(first <= num){
			third = second;
			second = first;
			first = num;
		}else if((second <= num) && (num < first) ){
			thid = second;
			second = num;
		}else if((third <= num) && (num < second)){
			third = num;
		}else{
			//???????????????
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: 'thid' was not declared in this scope; did you mean 'third'?
   19 |                         thid = second;
      |                         ^~~~
      |                         third
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int data[10]={0};
	for (int A=0;A<10;A++){
		cin>>data[A];
	}
	sort(A,A+10);
	cout<<data[9]<<data[8]<<data[7];
	return 0;
}

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

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<int> yama(10);
    for(int i=0;i<10;i++){
        cin >> yama[i];
    }
    sort(yama.begin(),yama.end);
    cout << yama[9] << "\n" << yama[8] << "\n" << yama[7] << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: no matching function for call to 'sort(std::vector<int>::iterator, <unresolved overloaded function type>)'
   12 |     sort(yama.begin(),yama.end);
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~~~
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: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, vector<int> >]'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:63: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<int*, std::vector<int> >'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/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, 2 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, 2 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, 2 provided
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int a[15];

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


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

#include<iostream>
#include<array>
int main(void){
std::array<int,10> h;
int tmp;
for(auto& e : h){
std::cin>>e;
}
std::sort(h.begin(),h.end());
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}

return 0;
}



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

#include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}
std::sort(h.begin(),h.end());
std::uniq(h.begin(),h.end());
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}
 
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: 'uniq' is not a member of 'std'; did you mean 'unique'?
   11 | std::uniq(h.begin(),h.end());
      |      ^~~~
      |      unique
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int a, max1, max2, max3;
     max1 = max2 = max3 = INT_MIN;
   while(cin >> a)
   {
       if(a > max3)
       {
           max3 = a;
           if(a > max1)
           {
               max3 = max2;
               max2 = max1;
               max1 = a;

           }
           else if( a > max2)
           {
               max3 = max2;
               max2 = a;
           }
       }

   } cout << max1 << endl << max2 << endl << max3 <<endl;

    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:8:27: error: 'INT_MIN' was not declared in this scope
    8 |      max1 = max2 = max3 = INT_MIN;
      |                           ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 |
Language: C++

#include<stdio.h>
#include<algorithm>
  
int main() {
    int m[10];
 
    for (int i = 0; i < 10; i++)scanf("%d",%m[i]);
 
    stable_sort(m, m + 10);
 
    for (int i = 9; i > 6; i--)printf("%d\n",&m[i]);
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:44: error: expected primary-expression before '%' token
    7 |     for (int i = 0; i < 10; i++)scanf("%d",%m[i]);
      |                                            ^
a.cc:9:5: error: 'stable_sort' was not declared in this scope; did you mean 'std::stable_sort'?
    9 |     stable_sort(m, m + 10);
      |     ^~~~~~~~~~~
      |     std::stable_sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:306:1: note: 'std::stable_sort' declared here
  306 | stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~~~~~~~~
Language: C++

N = 10
a = []
for i in range(N):
    a.append(input()) # ３度の入力に対して、1, 2, 3 と入力。
print(a) # ['1', '2', '3']




Compiler output:
a.cc:4:23: error: stray '#' in program
    4 |     a.append(input()) # ３度の入力に対して、1, 2, 3 と入力。
      |                       ^
a.cc:4:25: error: extended character 、 is not valid in an identifier
    4 |     a.append(input()) # ３度の入力に対して、1, 2, 3 と入力。
      |                         ^
a.cc:4:53: error: extended character 。 is not valid in an identifier
    4 |     a.append(input()) # ３度の入力に対して、1, 2, 3 と入力。
      |                                                     ^
a.cc:5:10: error: stray '#' in program
    5 | print(a) # ['1', '2', '3']
      |          ^
a.cc:1:1: error: 'N' does not name a type
    1 | N = 10
      | ^
Language: C++

#include <stdio.h>
#include <functional>
int main(){
  int mt[10], i;
  std::sort(mt, mt + 10, std::greater<int>);
  for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'sort' is not a member of 'std'
    5 |   std::sort(mt, mt + 10, std::greater<int>);
      |        ^~~~
a.cc:5:43: error: expected primary-expression before ')' token
    5 |   std::sort(mt, mt + 10, std::greater<int>);
      |                                           ^
Language: C++



#include <stdio.h> #include <functional> #include <algorithm<int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; } 



Compiler output:
a.cc:3:20: warning: extra tokens at end of #include directive
    3 | #include <stdio.h> #include <functional> #include <algorithm<int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
      |                    ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h> #include <functional> #include <algorithm>int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; } 


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> #include <functional> #include <algorithm>int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
      |                    ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h> #include <functional> #include <algorithm> int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; } 


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> #include <functional> #include <algorithm> int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }
      |                    ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h>
#include <functional>
#include <algorithm>
int main(){ int mt[10], i;
std::sort(mt, mt + 10
for (i = 9; i > 6; i--)
  printf("%d\n", mt[i]);
return 0; }


Compiler output:
a.cc: In function 'int main()':
a.cc:5:22: error: expected ')' before 'for'
    5 | std::sort(mt, mt + 10
      |          ~           ^
      |                      )
    6 | for (i = 9; i > 6; i--)
      | ~~~                   
a.cc:6:23: error: expected ';' before ')' token
    6 | for (i = 9; i > 6; i--)
      |                       ^
      |                       ;
Language: C++

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

int main() {
    int height[10];
    for (int i = 0; i < 10; ++i) cin >> height[i];
    sort(height, height + 10, greater<int>);

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:43: error: expected primary-expression before ')' token
    8 |     sort(height, height + 10, greater<int>);
      |                                           ^
Language: C++

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

int main(){
  vector<int> v;
  for(int i=0;i<10;i++){
    int m;
    cin >> m;
    v.push_back(m);
  }


  sort(v.begin(), v.end(), greater<int>());

  cout << v.at(0) << endl;
  cout << v.at(1) << endl;
  cout << v.at(2) << endl;

  return 0;
}



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

#include <stdio.h> using namespace std; int main(){ int count[10001],tmp,num=3; for(int i=0;i<10001;i++)count[i]=0; for(int i=0;i<10;i++){ scanf("%d",&tmp); count[tmp]++; } for(int i=10000;i>=0&&num>0;i--){ if(count[i]>0){ for(int k=0;k<count[i]&&num>0;k++){ printf("%d\n",i); num--; } } } return 0; }


Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> using namespace std; int main(){ int count[10001],tmp,num=3; for(int i=0;i<10001;i++)count[i]=0; for(int i=0;i<10;i++){ scanf("%d",&tmp); count[tmp]++; } for(int i=10000;i>=0&&num>0;i--){ if(count[i]>0){ for(int k=0;k<count[i]&&num>0;k++){ printf("%d\n",i); num--; } } } return 0; }
      |                    ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h> 
using namespace std; 
int main(){

 int count[10001],
tmp,num=3;
 
for(int i=0;i<10001;i++){

count[i]=0;

 for(int i=0;i<10;i++){

 scanf("%d",&tmp);
 count[tmp]++; 
} 

for(int i=10000;i>=0&&num>0;i--){ 

if(count[i]>0){ 

for(int k=0;k<count[i]&&num>0;k++){
 printf("%d\n",i);
 num--; 
}
 } 
} 
return 0; }


Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: expected '}' at end of input
   28 | return 0; }
      |            ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main() {
	multimap<int, greater<int>> mp; int temp; int c = 0;
	while (cin >> temp) { mp[c] = temp; c++; }
	for (int i = 0; i < 3; i++) cout << mp[i] << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:33: error: no match for 'operator[]' (operand types are 'std::multimap<int, std::greater<int> >' and 'int')
    7 |         while (cin >> temp) { mp[c] = temp; c++; }
      |                                 ^
a.cc:8:47: error: no match for 'operator[]' (operand types are 'std::multimap<int, std::greater<int> >' and 'int')
    8 |         for (int i = 0; i < 3; i++) cout << mp[i] << endl;
      |                                               ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int mt[10];
	for(int i=0;i<10;i++)
	 cin >> mt[i];
	sort(mt,mt+10,greater<int>());
	for(int i=0;i<3;i++)
		cout << mt[i] << endl;
}

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

#include <iostream>
using namespace std;
main() {
  int a[10];
  for(int i=0;i<10;i++) scanf("%d",&a[i]);
  sort(a,a+10,greater<int>());
  printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    6 |   sort(a,a+10,greater<int>());
      |   ^~~~
      |   short
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<function>

using namespace std;

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

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

#include<stdio.h>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){int a[10],i;for(i=0;i<10;i++)cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:37: error: 'cin' was not declared in this scope
    3 | main(){int a[10],i;for(i=0;i<10;i++)cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
      |                                     ^~~
Language: C++

#include<stdio.h>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:42: error: 'cin' is not a member of 'std'
    3 | main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
      |                                          ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<algorithm>
  +++ |+#include <iostream>
    3 | main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}
Language: C++

main(int a,int*b){
	for(a=0;a<3;++a)b[a]=0;
	for(;~scanf("%d",&b[3]);)
		for(a=4;--a;b[a]<b[a-1]?:(b[a-1]^=b[a]^=b[a-1]^=b[a]));
	for(a=0;a<3;++a)printf("%d\n",b[a]);
}

Compiler output:
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(int a,int*b){
      | ^~~~
a.cc:1:1: warning: second argument of 'int main(int, int*)' should be 'char **' [-Wmain]
a.cc: In function 'int main(int, int*)':
a.cc:3:15: error: 'scanf' was not declared in this scope
    3 |         for(;~scanf("%d",&b[3]);)
      |               ^~~~~
a.cc:5:25: error: 'printf' was not declared in this scope
    5 |         for(a=0;a<3;++a)printf("%d\n",b[a]);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | main(int a,int*b){
Language: C++

#import<algo.h>
main(){int i=0,h[10];for(;i<10;)cin>>h[i++];sort(h,h+10);for(i=9;i>6;)cout<<h[i--]<<endl;exit(0);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<algo.h>
      |  ^~~~~~
a.cc:1:8: fatal error: algo.h: No such file or directory
    1 | #import<algo.h>
      |        ^~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
int main(){
int yama[10];
int temp;
int i,j;

for(i=0;i<10;i++){
scanf("%d",&yama[i];
}
for(i=0;i<10;i++){
for("j=0;j<10;j++){
if(yama[i]>yama[j]){
temp=yama[j];
yama[j]=yama[i];
yama[i]=yama[j];
}
}
}
for(i=0;i<3;i++){
printf("%d\n",yama[i]);
}
return 0;
}

Compiler output:
a.cc:11:5: warning: missing terminating " character
   11 | for("j=0;j<10;j++){
      |     ^
a.cc:11:5: error: missing terminating " character
   11 | for("j=0;j<10;j++){
      |     ^~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:20: error: expected ')' before ';' token
    8 | scanf("%d",&yama[i];
      |      ~             ^
      |                    )
a.cc:12:1: error: expected primary-expression before 'if'
   12 | if(yama[i]>yama[j]){
      | ^~
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
a.cc:16:2: error: expected ';' before '}' token
   16 | }
      |  ^
      |  ;
   17 | }
      | ~ 
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
a.cc:16:2: error: expected ')' before '}' token
   16 | }
      |  ^
      |  )
   17 | }
      | ~ 
a.cc:11:4: note: to match this '('
   11 | for("j=0;j<10;j++){
      |    ^
a.cc:17:1: error: expected primary-expression before '}' token
   17 | }
      | ^
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'for'
   19 | for(i=0;i<3;i++){
      | ^~~
a.cc:19:9: error: 'i' does not name a type
   19 | for(i=0;i<3;i++){
      |         ^
a.cc:19:13: error: 'i' does not name a type
   19 | for(i=0;i<3;i++){
      |             ^
a.cc:22:1: error: expected unqualified-id before 'return'
   22 | return 0;
      | ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

int main(){
	int n;
	vector<int> high;
	
	for(int i=0 ; i<10 ; i++){
		cin >> n;
		high.push_back( n );
	}
	
	sort( high.begin() , high.end() );

	for(int i=9 ; i>=7 ; i--){
		cout << high.at( 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( high.begin() , high.end() );
      |         ^~~~
      |         short
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main()
{
	vector<int> arr(10);
	
	for(int i = 0; i < 10; i++){
		cin >> arr[i];
	}
	
	sort(arr.begin(),arr.end());
	
	printf("%d\n%d\n%d\n",a[10],a[9],a[8]);
	
	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(arr.begin(),arr.end());
      |         ^~~~
      |         short
a.cc:16:31: error: 'a' was not declared in this scope
   16 |         printf("%d\n%d\n%d\n",a[10],a[9],a[8]);
      |                               ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main()
{
	vector<int> arr(10);
	
	for(int i = 0; i < 10; i++){
		cin >> arr[i];
	}
	
	sort(arr.begin(),arr.end());
	
	printf("%d\n%d\n%d\n",arr[10],arr[9],arr[8]);
	
	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(arr.begin(),arr.end());
      |         ^~~~
      |         short
Language: C++

#include <stdio.h>

int main(){
	int talls[10], max, banme;
	for(int i = 0; i < 10; i++) scanf("%d", &talls[i]);
	for(int i = 0; i < 10; i++){
		max = 0;
		for(int j = 0; j < 10; j++){
			if(max < talls[j]){
				max = talls[j];
				banme = j;
			}
		}
		printf("%d\n", max);
		talls[j] = 0;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'j' was not declared in this scope
   15 |                 talls[j] = 0;
      |                       ^
Language: C++

s[];main(i){for(;~scanf("%d",s);)qsort(s,i++,4,"YXZQQQ\x8b\0+\x02\xc3");printf("%d\n%d\n%d\n",s[9],s[8],s[7]);}

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s[];main(i){for(;~scanf("%d",s);)qsort(s,i++,4,"YXZQQQ\x8b\0+\x02\xc3");printf("%d\n%d\n%d\n",s[9],s[8],s[7]);}
      | ^
a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token
    1 | s[];main(i){for(;~scanf("%d",s);)qsort(s,i++,4,"YXZQQQ\x8b\0+\x02\xc3");printf("%d\n%d\n%d\n",s[9],s[8],s[7]);}
      |         ^
Language: C++

# include <iostream>
using namespace std;
void main(){
	for(int i =1;i<=9;i++){
		for(int j=1;j<=9;j++){
			cout <<i<<"x"<<j<<"="<<i*j<<"\n";
		}
	}
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main(){
      | ^~~~
Language: C++

#include<iostream.h>
#include<vector.h>
#include<algorithm.h>
int main(){int n,i;vector<int> h;for(i=0;i<10;++i)cin>>n,h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;i--)cout<<h[i]<<endl;}

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

import java.util.*;

public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int[] dat = new int[10];
	for(int tc = 0; tc < 10; ++tc) {
	    dat[tc] = s.nextInt();
	}
	Arrays.sort(dat);
	for(int i = 0; i < 3; ++i) {
	    System.out.println(dat[9-i]);
	}
    }
}

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

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

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

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

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

return 0;
}

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

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

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

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

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

return 0;
}

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

#include<cstdio>
#include<algorithm>

using namespace std;

int main(){
	int a[10],i=0;
	for(;i<10;i++)scanf("%d",&a[i]);
	sort(a,a+10);
	for(i=0;i<3;i++)pritnf("%d\n",a[i]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: 'pritnf' was not declared in this scope; did you mean 'printf'?
   10 |         for(i=0;i<3;i++)pritnf("%d\n",a[i]);
      |                         ^~~~~~
      |                         printf
Language: C++

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    List<Integer> l = new ArrayList<Integer>();
    for (int i = 0; i < 10; i++) {
      int t = sc.nextInt();
      l.add(t);
    }
    
    Collections.sort(l);
    Collections.reverse(l);
    for (int i = 0; i < 3; i++) {
      System.out.println(l.get(i));
    }
  }
};

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

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

int main(){
    int height;
    vector<int> heights;
    while (cin >> height)
	heights.push_back(height);
    sort(heights.begin(), heights.end(), greater<int>());
    for (int i = 0; i < 3; i++)
	cout << heights[i] << endl;
}

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

main(a){for(printf("3776\n2848\n2840\n");~scanf("%d",&a););}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(a){for(printf("3776\n2848\n2840\n");~scanf("%d",&a););}
      |     ^
Language: C++

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

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a[],i;
      | ^
a.cc:2:1: error: ISO C++ forbids declaration of 'c' with no type [-fpermissive]
    2 | c(int*a){a=*a-*1[&a];}
      | ^
a.cc: In function 'int c(int*)':
a.cc:2:14: error: invalid conversion from 'int' to 'int*' [-fpermissive]
    2 | c(int*a){a=*a-*1[&a];}
      |            ~~^~~~~~~
      |              |
      |              int
a.cc:2:22: warning: no return statement in function returning non-void [-Wreturn-type]
    2 | c(int*a){a=*a-*1[&a];}
      |                      ^
a.cc: At global scope:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:20: error: 'a' was not declared in this scope
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                    ^
a.cc:3:22: error: 'i' was not declared in this scope
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                      ^
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |         ^~~~~
a.cc:3:40: error: 'printf' was not declared in this scope
    3 | main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}
      |                                        ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | a[],i;
Language: C++

#include<stdio.h>
#include<algorithm>
int main()
{
    int i,j,a[10];
    for(i=0;i<10;i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+10);
    printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   10 |     sort(a,a+10);
      |     ^~~~
      |     std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	bool completed,flag;
	int result[3],buf,temp[10];
	for(int i = 0; i < 10; i++){
		cin >> temp[i];
	}
	for(int l = 0; l < 3; l++{
		while(1){
			for(int j = l; j < 9; j++){
				if(temp[j] < temp[j+1]){
					buf = temp[j+1];
					temp[j+1] = temp[j];
					temp[j] = buf;
				}
			}
			flag = false
			for(int k = 0; k < 9; k++){
				if(temp[0] < temp[k]) flag = true;
			}
			if(flag != true) result[l] = temp[l];
			break;
		}
	}
	cout << result[0] << endl;
	cout << result[1] << endl;
	cout << result[2] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:34: error: expected ')' before '{' token
   10 |         for(int l = 0; l < 3; l++{
      |            ~                     ^
      |                                  )
a.cc:19:37: error: expected ';' before 'for'
   19 |                         flag = false
      |                                     ^
      |                                     ;
   20 |                         for(int k = 0; k < 9; k++){
      |                         ~~~          
a.cc:20:40: error: 'k' was not declared in this scope
   20 |                         for(int k = 0; k < 9; k++){
      |                                        ^
Language: C++

#include<iostream>
using namespace std;
main()
{ int  s=0;
  int x[10]={0,0,0,0,0,0,0,0,0,0,0};
  int t[3]={0,0,0};
  for(int i=0;i<0;i++){
    cin>>x[i];
  }

  for(int k=0;k<3;k++){
    for(int j=0;j<10;j++){
      if(t[k]<x[j]){
        s=t[k];
        t[k]=x[j];
        x[j]=s;
       }
     }
  }
  for(int e=0;e<3;e++){
    cout<<t[e]<<endl;
  }
return 0;
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:35: error: too many initializers for 'int [10]'
    5 |   int x[10]={0,0,0,0,0,0,0,0,0,0,0};
      |                                   ^
Language: C++

a;main(){a=!puts("10000\n9999\n9998");}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a;main(){a=!puts("10000\n9999\n9998");}
      | ^
a.cc:1:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | a;main(){a=!puts("10000\n9999\n9998");}
      |   ^~~~
a.cc: In function 'int main()':
a.cc:1:10: error: 'a' was not declared in this scope
    1 | a;main(){a=!puts("10000\n9999\n9998");}
      |          ^
a.cc:1:13: error: 'puts' was not declared in this scope
    1 | a;main(){a=!puts("10000\n9999\n9998");}
      |             ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
    vector<int> m(10);

    for(int i=0; i<10; i++){
        cin >> m[i];
    }
    sort(m.begin(), m.end());

    cout << m[9] << endl;
    cout << m[8] << endl;
    cout << m[7] << endl;

    return 0;
}

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(m.begin(), m.end());
      |     ^~~~
      |     short
Language: C++

#include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
int i, arr[100];
for (i=0;i<10;i++)
scanf ("%d", &arr[i]);
sort (arr, arr+10);
printf ("%d\n", a[9]);
printf ("%d\n", a[8]);
printf ("%d\n", a[7]);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'a' was not declared in this scope
   10 | printf ("%d\n", a[9]);
      |                 ^
Language: C++

a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a>b&&(t=a,a=b,b=t),b>c&&(t=c,c=b,b=t);printf("%d\n%d\n%d\n",c,b,a);}

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a>b&&(t=a,a=b,b=t),b>c&&(t=c,c=b,b=t);printf("%d\n%d\n%d\n",c,b,a);}
      | ^
a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token
    1 | a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a>b&&(t=a,a=b,b=t),b>c&&(t=c,c=b,b=t);printf("%d\n%d\n%d\n",c,b,a);}
      |           ^
Language: C++

#include <iostream>
#include <queue>
using namespace std;
void AOJ0001::st(){
	int c;
	priority_queue<int>  pq;

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

	}

}

Compiler output:
a.cc:4:6: error: 'AOJ0001' has not been declared
    4 | void AOJ0001::st(){
      |      ^~~~~~~
Language: C++

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

int main() {
    vector<int> input;
    for (int i = 0; i < 10; i++) {
        int tmp;
        cin >> tmp;
        input.push_back(tmp);
    }
    sort(input.rbegin(), input.rend());
    for (int i = 0; i < 3; i++) {
        cout << input[i] << endl;
    }
}

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(input.rbegin(), input.rend());
      |     ^~~~
      |     short
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a[10];
  for(int i=0;i<10;i++)
   cin>>a[i];
  for(int i=0;i<9;i++)
  for(int j=i+1;i<10;j++)
  if a[i]<a[j]
  {
    int tmp=a[i];
    a[i]=a[j]
    a[j]=tmp;
  }
  cout<<a[1];
  cout<<a[2];
  cout<<a[3];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:6: error: expected '(' before 'a'
   10 |   if a[i]<a[j]
      |      ^
      |      (