Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	var mountain []int
	for scanner.Scan() {
		i, err := strconv.Atoi(scanner.Text())
		if err != nil {
			break
		}
		mountain = append(mountain, i)
		counter++
		if counter == 10 {
			break
		}

	}
	sort.Ints(mountain)
	fmt.Println(mountain[9])
	fmt.Println(mountain[8])
	fmt.Println(mountain[7])
}

C++: #include<iostream>
using namespace std;
int main(){
  int m;
  int m1 = 0;
  int m2 = 0;
  int m3 = 0;
  while(cin >> m){   
 if(m1<m){
      m3 = m2;     
      m2 = m1;     
      m1 = m;
    }
    else if(m2<m){
      m3 = m2;   
      m2 = m;
    }
    else if(m3<m){
      m3 = m;
    }
  }
  cout << m1 << endl << m2 << endl << m3 <<endl;
  return 0;
}

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

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
    int s[11],i;
    for(i=0;i<10;i++){
        scanf("%d",&s[i]);
    }
    sort(s,s+10);
    for(i=9;i>6;i--){
        printf("%d\n",s[i]);
    }
 return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int hill[10];
	for(int i=0;i<10;i++){
		cin >> hill[i];
	}
	sort(hill,hill+10);
	for(int i=0;i<3;i++){
		cout << hill[i]<<"\n";
	}
}

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

using namespace std;

int main(void){
	int count = 0;
	set<int, greater<int> > nums;
	for (int i=0; i<10; ++i){
		int num;
		cin >> num;
		if ((0<=num) && (num<=10000)){
			nums.insert(num);
			count++;
		}
	}
	set<int, greater<int> >::iterator it = nums.begin();
	int n = 0;
	while (it != nums.end() && (n<3)){
		cout << *it << endl;
		++it;
		++n;
	}

	return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>

using namespace std;

# define N 10
# define k 3

int main()
{
	int i,A[11];
	for (i = 0; i < N; i++)
	{
		cin >> A[i];
	}
	sort(A, A + N);
	for (i = N - 1; i > N - k - 1; i--) cout << A[i] << endl;		//输出后 k 位
	return 0;
}

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

int main(){
	int h[10]={0};
	for(int i=0;i<10;i++){
		cin>>h[i];
	}
	int m=0,k=0;
	for(int i=0;i<10;i++){
		if(m<h[i]){m=h[i];k=i;};
	}
	cout<<m<<endl;
	h[k]=0;k=0;m=0;
	for(int i=0;i<10;i++){
		if(m<h[i]){m=h[i];k=i;};
	}
	cout<<m<<endl;
	h[k]=0;k=0;m=0;
	for(int i=0;i<10;i++){
		if(m<h[i]){m=h[i];k=i;};
	}
	cout<<m<<endl;
	h[k]=0;k=0;m=0;
	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007
#define Vi vector<int>
#define Vl vector<long long>
#define pb(a) push_back(a)

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
const ll INF=100000000001;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};
struct edge{int to,cost;};
struct pos{
	int x,y,cost;
};
int main() {

	int a[11];
	rep(i,10)cin>>a[i];
	sort(a,a+10,greater<int>());
	rep(i,3)cout<<a[i]<<endl;

	return 0;
}

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

int main(){
  array<int,10> xs;
  for(int i=0;i<10;++i)scanf("%d",&xs[i]);
  sort(xs.begin(),xs.end(),greater<int>());
  for(int i=0;i<3;++i)printf("%d",xs[i]);
  return 0;
}

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

int main(){
	bool completed,flag;
	int result[3],buf,temp[10];
	for(int i = 0; i < 10; i++){
		cin >> temp[i];
	}
	for(int l = 0; l < 3; l++){
		while(1){
			for(int j = l; j < 9; j++){
				if(temp[j] < temp[j+1]){
					buf = temp[j+1];
					temp[j+1] = temp[j];
					temp[j] = buf;
				}
			}
			flag = false;
			for(int k = 0; k < 9; k++){
				if(temp[0] < temp[k]) flag = true;
			}
			if(flag != true) result[l] = temp[l];
			break;
		}
	}
	cout << result[0] << endl;
	cout << result[1] << endl;
	cout << result[2] << endl;
	return 0;
}

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

C++: #include<iostream>

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

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

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

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=8;j++){
		cin>>hill[j];
	}

	int key;
	int flag;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				flag=hill[i];hill[i]=hill[i+1];hill[i+1]=flag;
			}
		}

	}

	cout<<hill[9]<<"\n"<<hill[8]<<"\n"<<hill[7]<<endl;

	return 0;

}