Go: package main

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

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; 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;
int main(){
    int a[10];
    for(int i=0; i<10; i++){
        cout<<"Height of mountain "<<i+1<<" ";
        cin>>a[i];
        cout<<endl;
    }
    for(int i=0; i<10; i++)
        for(int j=0; j<9-i; j++)
            if(a[j]<a[j+1])
                swap(a[j],a[j+1]);
     for(int i=0; i<3; i++)
             cout<<a[i]<<endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <queue>
#include <map>
#include <stack>
#include <list>
#include <vector>
using namespace std;
int Max1=-1;
int Max2=-1;
int Max3=-1;
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		if(n>Max1)
		{
			Max3=Max2;
			Max2=Max1;
			Max1=n;
			continue;
		}
		if(n>Max2)
		{
			Max3=Max2;
			Max2=n;
			continue;
		}
		if(n>Max3)
		{
			Max3=n;
			continue;
		}
	}
	cout<<Max1<<endl<<Max2<<endl<<Max3<<endl;
	return 0;
}

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

C++: #include <iostream>

using namespace std;
int main(){
  int a[10];
  for(int i = 0 ; i < 10 ; i++ ){
    cin >> a[i];
  }
  for(int i = 9 ; i > 0 ; i-- ){
    for(int j = 0 ; j < i ; j++ ){
      if(a[j] < a[j+1])swap(a[j],a[j+1]);
    }
  }
  cout << a[0] << endl << a[1] << endl << a[2] << endl;
  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)
		{
			if (c[i] == top)continue;
			second = top;
			top = c[i];
		}
		else
		{
			if (c[i]>=second)
			{
				if (c[i] == second)continue;
				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<iostream>
#include<queue>
using namespace std;

int main(){
	priority_queue<int> qu;

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

		qu.push(t);
	}

	for(int i = 0; i < 3; i ++)
	{
		cout<<qu.top()<<endl;
		qu.pop();
	}

    return 0;
}

C++: #include<stdio.h>
    
int main(void){
    
    /* 宣言と初期化 */
    int hai[10];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
    
for(i=0;i<10;i++)
{
scanf("%d",&hai[i]);
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
    
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       { tempmax=hai[i];
　　    hai[i]=0;}
    }
    
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd)
        {temp2nd=hai[i];hai[i]=0}
    }
    
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd)
        {temp3rd=hai[i];hai[i]=0}
    }
    
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
    
    return 0;
}

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

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

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

int main(){
  int i,x;
  std::vector<int>v;
  for(i=0;i<10;i++)scanf("%d",&x),v.push_back(x);
  std::sort(v.begin(),v.end());
  printf("%d\n%d\n%d\n",v[9],v[8],v[7]);
}

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

using namespace std;

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

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define REP0(i,n) for(int i=0;i<n;++i)
#define REP1(i,n) for(int i=1;i<=n;++i)
#define ALL(c) (c).begin(),(c).end()
int main(){
	int a[10];
	REP0(i,10) scanf("%d",&a[i]);
	sort(a,a+10);
	printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
	return 0;
}

C++: #include <iostream>
#include <array>
#include <algorithm>
 
int main(void) {
    std::array<u_int, 10> heights;
	
    for (u_int i = 0; i < 10; ++i) {
        std::cin >> heights[i];
    }
	
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
	
    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights[i] << std::endl;
    }
    return 0;
}

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

C++: #include <bits/stdc++.h>

using namespace std;

vector< int > adj;

int main()
{
    for(int i = 1; i <= 10; i++){
        int x;
        cin>> x;
        adj.push_back(x);
    }
    sort(adj.begin(), adj.end());
    cout<< adj[9] <<'\n' << adj[8] <<'\n' << adj[7];
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef long long LL;
typedef  vector<int> VI;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	VI hill;
	REP(i, 10)
	{
		int temp;
		cin >> temp;
		hill.push_back(temp);
	}
	SORT(hill);
	COUT(hill[9]);
	COUT(hill[8]);
	COUT(hill[7]);
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

int main() {
	vector<int> yama;
	int j;
	for (int i = 0; i < 10; i++) {
		cin >> j;
		yama.emplace_back(j);
	}
	sort(yama.begin(), yama.end());
	for (int i = 0; i < 3; i++) {
		cout << yama[9 - i] << endl;
	}
	return 0;
}