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 <iostream>

int main()
{
        uint16_t* height;
        height=new uint16_t [10];
        for(uint8_t i=0;i<10;i++)
                std::cin>>height[i];
        for(uint8_t i=0;i<10;i++)
                for(uint8_t j=i;j<10;j++)
                        if(height[i]<height[j])
                        {
                                uint16_t buf=height[i];
                                height[i]=height[j];
                                height[j]=buf;
                        }
        std::cout<<height[0]<<std::endl<<height[1]<<std::endl<<height[2]<<std::endl;
        delete(height);

        return 0;
}

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

int main(void)
{
    int a;
    int b[10];
    for (int i = 0; i < 10; i++)
    {
        cin >> a;
        if(a>=b[0])
        {
            b[2] = b[1];
            b[1] = b[0];
            b[0] = a;
        }
        else if(a>=b[1])
        {
            b[2] = b[1];
            b[1] = a;
        }
        else if(a>=b[2])
        {
            b[2] = a;
        }

    }

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

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++: #include<iostream>
using namespace std;

int main(){
int a[10] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922};
int ma=0, aa=0;

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

return 0;
}

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

using namespace std;

int main(){
	int M[10];
	for(int i = 0; i < 10; i++){
		cin >> M[i];
	}
	sort(M, M + 10);
	reverse(M, M + 10);
	cout << M[0] << "\n";
	cout << M[1] << "\n";
	cout << M[2] << "\n";
	return 0;
}

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

main(void){
    int num[10], i, high1 = 0, high2 = 0, high3 = 0;
    
    for( i = 0; i < 10; i++){
        scanf("%d", &num[i]);
        if( num[i] >= high1){
            high3 = high2;
            high2 = high1;
            high1 = num[i];
        }else if( num[i] >= high2){
            high3 = high2;
            high2 = num[i];
        }else if(num[i] >= high3){
            high3 = num[i];
        }
    }
    
    printf("%d\n%d\n%d\n", high1, high2, high3);

    return 0;
}

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

int main()
{
  int mt[10];
  int high[3];

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

  for(int i=0;i<3;i++)
    {
      high[i] = 0;
    }

  for(int i=0;i<10;i++)
    {
      if(mt[i]>high[0])
	{
	  high[2] = high[1];
	  high[1] = high[0];
	  high[0] = mt[i];
	}
      else if(mt[i]>high[1])
	{
	  high[2] = high[1];
	  high[1] = mt[i];
	}
      else if(mt[i]<=high[1] && mt[i]>high[2])
	{
	  high[2] = mt[i];
	}
    }

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

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <iomanip>
#include <algorithm>
#include <cmath>
using namespace std;
const int M = 100000;
const double pi = 3.141592653589;

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

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

int main() {
    vector<int> h(10);
    for (int i = 0; i < 10; ++i) {
        cin >> h[i];
    }
    sort(h.rbegin(), h.rend());
    for (int i = 0; i < 3; ++i) {
        cout << h[i] << endl;
    }
}

C++: #include<iostream>
using namespace std;
int main()
{	
	int a[10] = {};
	int i = 0;
	while (cin >> a[i]) {
		i++;
		if (i == 10)break;
	}
	int max;
	for (int j = 0; j < 3; j++) {
		max = j;
		for (int k = j + 1; k < 10; k++) {
			if (a[max] < a[k]) {
				max = k;
			}
		}
		cout << a[max] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
 
using namespace std;
 
vector<int> heights;
int input;
 
int main(){
 while(cin >> input) heights.push_back(input);
 sort(heights.begin(), heights.end());
 auto itr = heights.end()-1;
 cout << *itr << "\n" << *(itr-1) << "\n" << *(itr-2) << endl;
 
 return 0;
}

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

int main()
{
	int iHigh[10];

	for( int i=0;i<10;i++ ){
		scanf("%d",&iHigh[i]);
	}

	sort( iHigh,iHigh+9,greater <int>() );

	for( int i=0;i<3;i++ ){
		printf("%d\n",iHigh[i]);
	}

	return 0;
}

C++: #include"iostream"

using namespace std;

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

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

using namespace std;
typedef long long ll;
typedef pair<int, int> pint;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define IMAX INT_MAX
#define IMIN INT_MIN
#define LMAX LLONG_MAX
#define LMIN LLONG_MIN
template<typename T> inline void chmin(T &a, T b){ if(a > b) a = b; }
template<typename T> inline void chmax(T &a, T b){ if(a < b) a = b; }
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }

int main() {
    vector<int> a;
    REP(i, 10){
        int n;
        cin >> n;
        a.push_back(n);
    }
    sort(ALL(a));
    cout << a[9] << endl << a[8] << endl << a[7] << endl;
    
    return 0;
}

C++: #include<stdio.h>
int main(void){
	int i;
	int a[10];
	int x=0, y=0, z=0;
	
	for(i=0;i<10;i++){
		do{
			printf("山の高さ%d(整数)",i+1);
			scanf("%d",&a[i]);
		}while(a[i]<=0||10000<=a[i]);
		
		if(a[i]>x){
			z=y;
			y=x;
			x=a[i];
		}
		else if(a[i]>y){
			z=y;
			y=a[i];
		}
		else if(a[i]>z){
			z=a[i];
		}
	}
	
	printf("%d\n%d\n%d\n",x,y,z);
	
	return 0;
}

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

using namespace std;

int tmp;
vector<int> vec;

int main(){
    for (int i=0; i<10; i++) {
        scanf("%d",&tmp);
        vec.push_back(tmp);
        make_heap(vec.begin(),vec.end());
    }
    for (int i=0; i<3; i++) {
        printf("%d\n",vec.front());
        pop_heap(vec.begin(),vec.end());
        vec.pop_back();
    }
}