Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

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

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

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

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

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

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

	for(int i=9;i>6;--i){
		cout << tall[i] << endl;
	}

	return 0;
}

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

using namespace std;

int main()
{
	int mon[10];
	for(int i = 0;i <10; i++){
		cin >> mon[i];
	}
	
	int first = 0;
	for(int i = 0; i < 10; i++){
		if(first < mon[i]) first = mon[i];
	}
	
	int second = 0;
	for(int i = 0; i < 10; i++){
		if(second < mon[i] && mon[i] != first) second = mon[i];
	}
	
	int third = 0;
	for(int i = 0; i < 10; i++){
		if(third < mon[i] && mon[i] != first && mon[i] != second) third = mon[i];
	}
	
	printf("%d\n%d\n%d\n", first, second, third);
	
	return 0;
}

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

using namespace std;
int main() {
	vector<int> v;
	for(int i = 0; i < 10; ++i) {
		int n;
		cin >> n;
		v.push_back(n);
	}

	partial_sort(v.begin(), v.begin() + 3, v.end()
		, [](const int& x, const int& y) { return x > y;});
	
	for_each(v.begin(), v.begin() + 3, [](int x) {
		cout << x << endl;
	});
}

C++: //
//  main.cpp
//  0001
//
//  Created by 竹内 文登 on 13/07/13.
//  Copyright (c) 2013年 竹内 文登. All rights reserved.
//

#include <iostream>
using namespace std;

int main()
{
    
    int i = 10,m[10];
    
    while(i>0){
        cin >> m[i];
        i--;
    }
    
    int max = m[0],index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;;
    m[index] = 0;
    
    max = m[0];
    index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;
    m[index] = 0;
    max = m[0];
    index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;

    m[index] = 0;
    
    return 0;
}

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


int main(void){

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

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


	max1 = 0;
	max2 = 0;
	max3 = 0;

	for (i=1; i<11; ++i){
		if (a[max1] < a[i]){max1 = i;}
	}
		for (i=1;i<11;++i){
			if (a[i] < a[max1]){
				if (a[max2] < a[i]){max2 = i;}
		}
		}
			for (i=1;i<11;++i){
			if (a[i] < a[max2]){
				if (a[max3] < a[i]){max3 = i;}
		}
			}

		cout << a[max1] << endl;
		cout << a[max2] << endl;
		cout << a[max3] << endl;
		

		return 0;
	}

C++: #include <iostream>

int main(int argc, const char * argv[]) {
    
    int top1=0, top2=0, top3=0 ;
    
    for (int i=0; i<10; i++) {
        int inputNum ;
        std::cin >> inputNum ;
        if ( inputNum > top1 ) {
            top3 = top2 ;
            top2 = top1 ;
            top1 = inputNum ;
        } else if ( inputNum > top2 ) {
            top3 = top2 ;
            top2 = inputNum ;
        } else if ( inputNum > top3 ) {
            top3 = inputNum ;
        }
    }
    
    printf("%d\n%d\n%d\n", top1, top2, top3) ;
    
    return 0;
}

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

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

C++: #include<cstdio>
#include<iostream>
using namespace std;
int a[11];
int main()
{
	int i,max1=-1,max2=-1,max3=-1;
	for(i=1;i<=10;i++)
	{
		cin>>a[i];
		if(a[i]>max1){max3=max2;max2=max1;max1=a[i];}
		else if(a[i]>max2){max3=max2;max2=a[i];}
		else if(a[i]>max3)max3=a[i];
	}
	cout<<endl<<max1<<endl<<max2<<endl<<max3;
	return 0;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
    int m[11];
    for(int i=0; i<10; i++){
        cin >> m[i];
    }
    sort(m, m+10);
    for(int i=9; i>6; i--){
        cout << m[i] << "\n";
    }
    
    
    return 0;
}

C++: #include<iostream>
 using namespace std;
int main(){
	int input[10];
	int first;
	int second;
	int third;
	for(int i;i<10;i++){
		cin>>input[i];
	}
	for(int i;i<10;i++){
	if(input[i]>first){
	first = input[i];
        input[i] = 0;
	}
	}
	for(int i;i<10;i++){
	if(input[i]>second){
	second = input[i];
        input[i] = 0;
	}
	}
	for(int i;i<10;i++){
	if(input[i]>third){
	third = input[i];
	}
	}
	cout<<first<<endl;cout<<second<<endl;cout<<third<<endl;
	return 0;

}

C++: #include<stdio.h>
#include<iostream>
#include<stdlib.h>
#include<string.h>
using namespace std;
const int inf = 0x3f3f3f;
int main()
{
    int a[20];
    bool vis[20];
    memset(vis,0,sizeof(vis));
    for(int i = 1 ; i <= 10 ; i++)
        scanf("%d",&a[i]);
    for(int k = 1 ; k <= 3 ; k++)
    {
        int maxx = -inf ,t;
        for(int i = 1 ; i <= 10 ; i++)
        {
            if(!vis[i] && maxx < a[i])
            {
                maxx = a[i];
                t = i;
            }
        }
        vis[t] = 1;
        printf("%d\n",maxx);
    }
}

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

int main(){
	int hills[10];
	char string[256];
	fgets(string, 256, stdin);
	for (int i = 0; i < 10; i++){
		char* one;
		one = strtok(string, "\n");
		hills[i] = atoi(one);
	}
	int top[4] = {0};
	for (int i = 0; i < 10; i++){
		if (hills[i] > top[0]){
			top[3] = top[2];
			top[2] = top[1];
			top[1] = top[0];
			top[0] = hills[i];
		}else if (hills[i] > top[1]){
			top[3] = top[2];
			top[2] = top[1];
			top[1] = hills[i];
		}else if (hills[i] > top[2]){
			top[2] = top[1];
			top[1] = hills[i];
		}
	}
	fprintf(stdout, "%d\n%d\n%d",top[0],top[1],top[2]);
	return 0;
}

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

int main(){
	list<int> yama;
	int tmp=0;
	while(yama.size()<10){
		cin>>tmp;
		yama.push_back(tmp);
	}
	yama.sort(greater<int>());
	list<int>::iterator it=yama.begin();
	for(int i=0;i<3;i++){
		cout<<*it<<endl;
		it++;
	}
	
	return 0;
}

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

using namespace std;

int main(){

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

	}
	sort(a,a+10);
	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	cout<<a[7]<<endl;

return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}

std::sort(h.begin(),std::remove_if(h.begin(),h.end(),[](int x) { return x>=10000; }));

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