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>
using namespace std;

void cswap(int &x, int &y)
{
    int tmp = x;
    x = y;
    y = tmp;
}

int main(void){

	int a[11],max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[1];

	for (i=2; i<11; i++){
		if (max1 < a[i]){
			cswap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (i=3; i<11; i++){
		if (max2 < a[i]){
			cswap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (i=4; i<11; i++){
		if (max3 < a[i]){
			cswap(max3,a[i]);
		}
	}


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

return 0;
	}

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

int main(void) {
    priority_queue<int> que;
    
    
    int num;
    while(scanf("%d", &num) != EOF) {
        que.push(num);
    }
    cout << que.top() << endl; que.pop();
    cout << que.top() << endl; que.pop();
    cout << que.top() << endl; que.pop();
    
    return(0);
}

C++: #include<stdio.h>
int main(void)
{
	int i,j,n[10],w;
	for(i=0;i<10;i++){
		scanf("%d",&n[i]);
	}
	for(i=0;i<10;i++){
		for(j=0;j<=10;j++){
			if(n[j]<=n[i]){
				w=n[i];
				n[i]=n[j];
				n[j]=w;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",n[i]);
	}
	return 0;
}

C++: #include <stdio.h>

int main()
{
    int i,height,one = 0,two = 0,three = 0;
    for(i=0;i<10;++i){
        scanf("%d",&height);
        if(one < height){
            three = two;
            two = one;
            one = height;
        }else if(two < height){
            three = two;
            two = height;
        }else if(three <= height){
            three = height;
        }
    }
    printf("%d\n%d\n%d\n",one,two,three);
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    vector<int> v(10);
    for(int i = 0; i <10; i++) cin >> v[i];
    sort(v.begin(), v.end(), greater<int>());
    for(int i = 0; i < 3; i++) cout << v[i] <<"\n";
}

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

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

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

C++: #include <cstdio>
#include <vector>
#include <algorithm>
bool sortFunc (int a, int b) {
	return (a > b);
}

int main (int argc, char**argv) { 
	using namespace std;
	int reader;
	vector<int> vec(10, 0);
	for(int i = 0; i < 10; ++i) {
		fscanf(stdin, "%d", &reader);
		vec[i] = reader;
	}
	sort(vec.begin(), vec.end(), sortFunc);
	for (int i=0; i<3; i++) {
		printf("%d\n", vec[i]);
	}
}