Go: package main

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

func main() {
	mountHeightList := make([]int64, 10)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 10; i++ {
		scanner.Scan()
		mountHeightList[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	sort.Slice(mountHeightList, func(i, j int) bool { return mountHeightList[i] > mountHeightList[j] })

	for i := 0; i < 3; i++ {
		fmt.Printf("%d\n", mountHeightList[i])
	}
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXIST2(s,e) (find(ALL(s),(e))!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define EACH(t,i,c) for(t::iterator i=(c).begin(); i!=(c).end(); ++i)
const double EPS = 1e-10;
const double PI  = acos(-1.0);


int main(){
	vi a;
	REP(i,10){
		cin>>a[i];
	}
	sort(RALL(a));
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
}

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  i=0,j=0;
    int a[10]={};


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


    //cout << endl;

return 0;

}

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

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

C++: #include<iostream>

using namespace std;
 
int main(){
  int x[10],tmp,i,j;

  for(i=0; i<10; ++i)
    cin >> x[i];

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

  /*
  for(i=0; i<10; ++i){
    for(j=i+1; j<10; ++j){
      if(x[i] < x[j]){
	tmp = x[i];
	x[i] = x[j];
	x[j] = tmp;
      }
    }
  */
  }

  for(i=0; i<3; ++i)
    cout << x[i] << "\n";

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int num[10];
    for(long long int i=0;i<10;i++)
    {
        cin>>num[i];
    }
    sort(num,num+10);
    for(long long int i=9;i>=7;i--)
    {
        cout<<num[i]<<endl;
    }
    return 0;
}

C++: #include<stdio.h>

int main(void){

	int h[10];
	
	int i,j,t;
	for(i=0;i<10;i++){
		printf("%d",i+1);
		scanf("%d",&h[i]);
	}
	for(i=0;i<9;i++)
	{
		for(j=i;j<10;j++)
		{
			if(h[i]<h[j])
			{
			   t=h[i];
			   h[i]=h[j];
			   h[j]=t;
			}
		}
	}
	for(i=0;i<3;i++)
	{
		printf("%d\n",h[i]);
	}


	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int x, buf, i, j;
  int top[3];
  for(i = 0; i < 3; i++)
    top[i] = 0;

  for(i = 0; i < 10; i++){
    cin >> x;
    if(x > top[2]){
      top[2] = x;
      j = 2;
      while(j > 0){
        if(top[j-1] <top[j]){
          top[j-1] = buf;
          top[j-1] = top[j];
          top[j] = buf;
          j--;
        }else{
          break;
        }
      }
    }
  }

  for(i = 0; i<3; i++)
    cout << top[i] << '\n';

  return 0;
}

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