Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

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

using namespace std;
const int NMAX = 10000;

void PrintArray(int* A, int N)
{
   cout << A[0]; 
   for (int k = 1; k < N;k++) {
     cout << " " << A[k] ; 
   }
   cout << endl;
}
void Swap(int& a, int &b) {
  int tmpA, tmpB;
  tmpA = a;
  tmpB = b;
  a = tmpB;
  b = tmpA;
}

int selectionSort(int* A, int N){
  int count = 0;
  for (int i = 0; i < N - 1; i++){
    int minj = i;
    for (int j = i+1; j < N; j++) {
      if (A[j] < A[minj]) {
        minj = j;
      }
    }
    Swap(A[i], A[minj]);
    if (i != minj) { 
      count += 1;
    }
  }
  return count;
} 


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

C++: #include <stdio.h>
#include <stdlib.h>
#define MAXN 10
typedef struct DNode
{
  int data;
  DNode *next;	
}llist;
void creatlist(llist*&head,int a[],int n)
{
	llist *pre,*q;
	head=(llist *)malloc(sizeof(llist));
	pre=head;
	for(int i=1;i<=n;i++)
	{
	 q=(llist *)malloc(sizeof(llist));
	 q->data=a[i];
     pre->next=q;
     pre=q; 
	}
	pre->next=NULL;
}
void swapi(llist*&L)
{
 llist *q,*p;
 q=L->next;
 p=L->next->next;
 q->next=NULL;
 L->next=p;
 q->next=p->next;
 p->next=q;  	
}

bool sorti(llist*&L)
{
  llist *p,*q;
  p=L->next;
  q=L;
  int count=0,c2;
  while(p->next!=NULL)
  {
   count++;
   p=p->next;	
  }
  c2=count;
  if(L->next->next==NULL&&L->next==NULL)
  return 0;
  else
  {
  	while(count--)
  	{
  		c2=count+1;
 	  while(c2--)
 	  {
  	 	if(q->next->data<q->next->next->data)
  	 	swapi(q);
		q=q->next; 	
  	  }
  	   q=L;
    }
  }	
}
int main()
{
    int a[MAXN];
    llist *p;
    for(int i=1;i<=MAXN;i++)
    scanf("%d",&a[i]);
    creatlist(p,a,MAXN);
    sorti(p);
    for(int i=1;i<=3;i++)
    {
      p=p->next;
   	  printf("%d\n",p->data);
    }  
	return 0;
}

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

int main()
{
	int h[3] = { 0 };
	int x;
	for (int i = 1; i <= 10; i++) {
		scanf("%d", &x);
		if (x > h[3]) {
			if (x > h[2]) {
				if (x > h[1]) {
					h[3] = h[2];
					h[2] = h[1];
					h[1] = x;
				}
				else {
					h[3] = h[2];
					h[2] = x;
				}
			}
			else {
				h[3] = x;
			}
		}
	}

	printf("%d\n%d\n%d\n", h[1], h[2], h[3]);

	return 0;
}

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

int main(void){

  int h[10];
　int a = 0;

  cin >> h;

  for(int j=0; j<3; j++){
    for(int i=0; i<10; i++){
        if(a<h[i]) a = i;
    }
    cout << h[a] <<endl; 
    h[a] = 0;
  }  

  return(0);
}

C++: #include <iostream>

using namespace std;

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

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

int main() {
	int m;
	int t[3]={0};
	while(cin>>m){
		for(int i=0;i<3;i++)
			if(m>t[i]) swap(t[i],m);
	}
	for(int i=0;i<3;i++){
		cout<<t[i]<<endl;
	}
	return 0;
}

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

int main(int argc, const char * argv[]) {
    
    // input from txt
    string filename = "input.txt";
    ifstream fin(filename);
    
    if(fin.fail()){
        cout << "load fail...";
    }
    
    vector<int> heights(10);
    for (int i=0; i<10; i++){
        cin >> heights[i];
    }
    sort(heights.begin(), heights.end(), greater<int>());
    
    for (int i=0; i<3; i++){
        cout << heights[i] << endl;
    }
    
    return 0;
}

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;
}

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

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; }

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

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


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

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

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;
}

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

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

int main()
{
    std::vector<int> numbers;
    for (int i = 0; i < 10; i++) {
        int value;
        std::cin >> value;
        numbers.push_back(value);
    }
    
    sort(numbers.begin(), numbers.end());

    std::vector<int>::reverse_iterator it = numbers.rbegin();
    std::cout << *it++ << std::endl;
    std::cout << *it++ << std::endl;
    std::cout << *it << std::endl;

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
int i, j, n[10], max, temp;

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

for(i=0; i<10; i++){
max = i;
for(j = i + 1; j < 10; j++){
if(n[max] < n[j]) max = j;
}
temp = n[max];
n[max] = n[i];
n[i] = temp;

while(i==0){
cout<<temp<<endl;
break;
}
while(i==1){
cout<<temp<<endl;
break;
}
while(i==2){
cout<<temp<<endl;
break;
}

}
}

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

int main(){

	int i = 0,j=0,k=0;
	int mountain[11] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922};

	for(i=0;i<10;i++){
		for(j=i+1;j<10;j++){
	if(mountain[i] < mountain[j]){
		k = mountain[j];
		mountain[j] = mountain[i] ;
		mountain[i] = k ;
	}
	}
	}

	for(i=0;i<3;i++){
		cout << mountain[i] <<"\n" ;
	}
  return 0;
}

C++: #include<stdio.h>
#define MAX 10

void bsort(int a[],int n)
{
	int i,j;
	for(i = 0 ; i < n-1 ; i++){
		for( j=n-1 ; j>i ; j--){
			if(a[j-1]<a[j]){
				int temp = a[j];
				a[j] = a[j-1];
				a[j-1] = temp;
			}
		}
	}
}

int main(void)
{
	int s[MAX];
	int i;
	
	for( i=0 ; i<MAX ; i++){
		scanf("%d",&s[i]);
	}
	
	bsort(s,MAX);
	
	for(i=0 ; i<3 ; i++){
		printf("%d\n",s[i]);
	}
}