Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)

	s := make([]int, 10)
	for i := 0; i < 10; i++ {
		s[i], _ = strconv.Atoi(read())
	}
	sort.Sort(sort.Reverse(sort.IntSlice(s)))
	fmt.Println(s[0])
	fmt.Println(s[1])
	fmt.Println(s[2])
}

C++: #include <stdio.h>
#include <math.h>

#define DEBUG

#ifndef DEBUG 
#define fprintf (void)
#endif 

int main(void){
	
	int i,rec;
	int high[3]={0,0,0};
	
	for(i=0;i<10;i++){
		scanf("%d",&rec);
		if(rec>=high[0]){
			high[2]=high[1];
			high[1]=high[0];
			high[0]=rec;
		}else if(rec>=high[1]){
			high[2]=high[1];
			high[1]=rec;
		}else if(rec>=high[2]){
			high[2]=rec;
		}
	}
	
	for(i=0;i<3;i++){
		printf("%d\n",high[i]);
	}
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
int A[3];int a,b,c;
for(int i=0;i<10;i++){cin>>a;if(a>A[0]){b=A[0];A[0]=a;c=A[1];A[1]=b;A[2]=c;}else if(a>A[1]){b=A[1];A[1]=a;A[2]=b;}else if(a>A[2]){A[2]=a;}}
cout<<A[0]<<endl<<A[1]<<endl<<A[2]<<endl;return 0;}

C++: #include<iostream>
using namespace std;

int main(){
    int temp;
    int key=-1;
    int data[3]={0};
    for(int i=0;i<10;i++){
        cin>>temp;
        for(int j=0;j<3;j++){
            if(temp>data[j])
            key=j;
        }
        if(key>=0){
            data[key]=temp;
            key=-1;
        }
    }
    for(int i=2;i>-1;i--){
        cout<<data[i]<<endl;
    }
        return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
#include <array>

int mountains[10];

int main(int argc, const char * argv[])
{
    for(int i=0;i<sizeof(mountains);i++){
        std::cin >> mountains[i];
    }
    
    std::sort(mountains, mountains+sizeof(mountains));
    
    for (int i = 0; i < sizeof(mountains); ++i)
        std::cout << mountains[i] << '\n';
    
    return 0;
}

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

C++: #include <iostream>
#include <cstdlib>
#include <fstream>

int main(int argc, char *argv[]){
	//	std::ifstream datafile(argv[1]); //input datafile
	std::string str;
	int mt_height[10] = {}; //height of mountain
	int ans[3] = {}; // top 3 height of mountain. 0 -> no.1 1 -> no.2 2 -> no.3

	// if(datafile.fail()){
	// 	std::cout << "error : can't open this file." << std::endl;
	// 	exit(1);
	// }

	//input 10 height of mountain
	for(size_t i = 0; i < 10; i++){
		std::getline(std::cin, str);
		sscanf(str.c_str(), "%d", &mt_height[i]);

		if((mt_height[i] < 0) || (mt_height[i] > 10000)){
			std::cout << "error : out of constraints" << std::endl;
			exit(1);
		}
	}

	//select top 3 height of mountain and sort ans[]
	for(size_t i = 0; i < 10; i++){
		if(ans[0] < mt_height[i]){
			ans[2] = ans[1];
			ans[1] = ans[0];
			ans[0] = mt_height[i];
		}else if(ans[1] < mt_height[i]){
			ans[2] = ans[1];
			ans[1] = mt_height[i];
		}else if(ans[2] < mt_height[i]){
			ans[2] = mt_height[i];
		}
	}

	//output ans[]
	for(size_t i = 0; i < 3; i++){
		std::cout << ans[i] << std::endl;
	}

	return 0;
}

C++: 1819
2003
876
2840
1723
1673
3776
2848
1592
922

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
	int a=0;
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	for(int d=0;d<3;d++){
		for(int i=0;i<10;i++){
			if(vec[i]>a)a=vec[i];
		}
		std::cout<<a<<std::endl;
		for(int i=0;i<10;i++){
			if(vec[i]==a)vec[i]=0;
		}
		a=0;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main(){
  int height, list[10];

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

  for(int i=0; i<9; i++){
    for(int j=9; j>i; j--){
      if(list[j]>list[j-1]){
	swap(list[j], list[j-1]);
      }
    }
  }

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

C++: #include <iostream>

using namespace std;

void reverse(int *array, int length) {
	int i;
	int j;
	for(i=0;i<length-1;i++){
		for(j=i+1;j<length;j++){
			if(array[i]<array[j]){
				int temp=array[i];
				array[i]=array[j];
				array[j]=temp;
			}
		}
	}
}

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

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int values[10];

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

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


	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
  int data[10];
  for(int i=0;i<10;i++){
    scanf("%d",&data[i]);
  }
  sort(data,data+10);
  printf("%d\n",data[9]);
  printf("%d\n",data[8]);
  printf("%d\n",data[7]);
  return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
    int x[10];
    for (unsigned int i = 0; i < sizeof(x) / sizeof(int); i++)
        cin >> x[i];
    int first = 0;
    for (unsigned int i = 0; i < sizeof(x) / sizeof(int); i++)
        if (x[i] > first)
            first = x[i];
    int second = 0;
    for (unsigned int i = 0; i < sizeof(x) / sizeof(int); i++)
        if (x[i] > second && first > x[i])
            second = x[i];
    int third = 0;
    for (unsigned int i = 0; i < sizeof(x) / sizeof(int); i++)
        if (x[i] > third && second > x[i])
            third = x[i];
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <queue>
#include <vector>

#define pb push_back

using namespace std;

typedef long long ll;

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

        return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int insertionSort(int a[],int n)
{
	for(int i=0;i<n;i++)
	{
		int j=i-1;
		int min=a[i];
		while(a[j]>min&&j>=0)
		{
			a[j+1]=a[j]; 
			j--;	
		}
		a[j+1]=min;
	}
 } 
int main()
{
	int x[10];
	for(int i=0;i<10;i++)
		cin>>x[i];
	insertionSort(x,10);	
	for(int i=9;i>=7;i--)
	cout << x[i] << endl;	
	return 0;
}

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

int main()

{
    int ar[11];
    int i,j;
    for(i=0;i<10;i++)
        scanf("%d",&ar[i]);
    sort(ar, ar+10);
    for(j=9;j>6;j--){
        printf("%d\n",ar[j]);
    }

    return 0;
}

C++: #include<stdio.h>
#include<algorithm>

using namespace std;
int main()
{
    int a[100],i;
    int n=10;
    scanf("%d",&n);

    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+n);
     printf("%d\n%d\n%d\n",a[n-1],a[n-2],a[n-3]);
    return 0;
}

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+ 9);
  printf("%d\n", a[9]);
  printf("%d\n", a[8]);
  printf("%d\n", a[7]);
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	int deta[11];

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

	sort (deta, deta + 10);

	for (int i = 9; i >= 7; i--){
		cout << deta[i] << endl;
	}

	return 0;
}

C++: #include <cstdio> #include <algorithm> using namespace std; int main(void){ int a[10]; int i; for(i=0;i<10;i++){ scanf("%d",&(a[i])); } sort(a,a+10); for(i=9;i>6;i--){ printf("%d\n",a[i]); } return 0; }