Go: package main

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

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

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

int main()
{
	int i, h;
	int mh[3] = {0};

	for(i=0;i<10;i++){

		cin>>h;
		if(0<=h && h<=10000)
		if(mh[0] < h){
			mh[2] = mh[1];
			mh[1] = mh[0];
			mh[0] = h;
		}
		else if(mh[1] < h){
			mh[2] = mh[1];
			mh[1] = h;
		}
		else if(mh[2] < h) mh[2] = h;

	}
	for(i=0;i<3;i++)	cout<<mh[i]<<endl;

	

	return 0;
}

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

int main() {
  vector<int> v;
  for(int i=0; i<10; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(),v.end(), greater<int>());
  for(int i=0; i<3; i++)
    cout << v[i] << endl;
}

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

using namespace std;

int main(void){
	//FILE* fp_in = freopen("data.txt", "r", stdin);
	int height[10];
	for(int i = 0; i < 10; i++)
		cin >> height[i];

	sort(height,height + 10);

	for(int i = 9; i >= 7; i--)
		cout << height[i] << endl;
	//while(1){}
    return 0;
}

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

int main(){
	short int h[10]={};
	

	for(short int i=1; i<=10;i++){
		cin >> h[i];
		if(!(0<=h<=10000)){
			i--;
			continue;
		}
	}
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;i++){
		cout << h[i] << endl;
	}
	return 0;
}

C++: #include<stdio.h>

int main()
{
	int high[10];
	int cases;
	
	for(int i=0;i<9;i++)
	{
		printf("height of mountain %d",i);
		scanf("%d",&high[i]);
		printf("\n");
	}
	
	
	for(int i=0;i<9;i++)
	{
		for(int j=i+1; j<10; j++)
		{
			if(high[i] < high[j])
			{
				cases = high[i];
				high[i] = high[j];
				high[j] = cases;
			}
		}
	}
	
	printf("%d\n",high[0]);
	printf("%d\n",high[1]);
	printf("%d\n",high[2]);
	
	return 0;
}

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

int main(){

	int input[10], temp, i, j;
	
	for(i=0; i < 10; i++){
	
	cin >> input[i];
	
	}

	for(i = 0; i < 10; i++){
		for(j= 0; j < 9; j++){
			if(input[j] < input[j+1]){
				temp = input[j];
				input[j] = input[j+1];
				input[j+1] = temp;
				}
			}
		}
		
	for(i = 0; i < 3; i++){
	
	cout << input[i] << endl;
	
	}

	return 0;
	
}

C++: #include<iostream>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}

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

void bubbleSort(vector<int> &h)
{
	int tmp;
	for (int i = 0; i < h.size() - 1; i++)
	{
		for (int j = 0; j < h.size() - 1 - i; j++)
		{
			if (h[j] < h[j + 1])
			{
				tmp = h[j + 1];
				h[j + 1] = h[j];
				h[j] = tmp;
			}
		}
	}
}

int main()
{
	vector<int> height(10);
	for (int i = 0; i < 10; i++)
	{
		cin >> height[i];
	}
	bubbleSort(height);
	for (int i : height)
	{
		cout << i << endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define pb push_back
using namespace std;
typedef long long ll;
struct edge{int to;ll cost;};
typedef pair<ll,int> P;
const ll INF=1000000000000LL;
const ll MOD=1000000007LL;
const ll MAX=100010;
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10,greater<int>());
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
	return 0;
}

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

int main() {
	multiset<int, greater<int>> ms; int temp;
	for (int i = 0; i < 10; i++) { cin >> temp; ms.insert(temp); }
	auto itr = ms.begin();
	for (int i = 0; i < 3; i++) { cout << *itr << endl; itr++; }
	return 0;
}

C++: /*************************************************************************
    > File Name: 2387.cpp
    > Author: xudian
    > Email: xudianc@gmail.com
    > Created Time: 五 12/22 09:22:23 2017
 ************************************************************************/

#include <iostream>
#include <algorithm>
#include <cstring>

using namespace std;

const int maxn = 1010;
const int inf = 0x3f3f3f3f;
int mp[maxn][maxn];
bool vis[maxn];
int ans[maxn];
int T, N;
void dijkstra(int st){
	memset(vis, false, sizeof vis);
	ans[1] = 0;
	for (int i = 1; i <= N; ++i){
		int tmp = inf;
		for (int j = 1; j <= N; ++j){
			if (!vis[j] and tmp > ans[j]){
				tmp = ans[st = j];
			}
		}
		vis[st] = true;
		for (int j = 1; j <= N; ++j){
			ans[j] = min(ans[j], ans[st] + mp[st][j]);
		}
	}
}
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	while (cin >> T >> N){
		memset(mp, 0x3f, sizeof mp);
		memset(ans, 0x3f, sizeof ans);
		int a,b,dis;
		for (int i = 0; i < T; ++i){
			cin >> a >> b >> dis;
			if (mp[a][b] > dis){
				mp[a][b] = mp[b][a] = dis;
			}
		}
		dijkstra(1);
		cout << ans[N] << endl;
	}
	return 0;
}

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

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

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

int main(){
	int nyuryoku,high=0,low=0,middle=0,flag=0;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	flag++;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else
				middle = nyuryoku;
			}else
				low = nyuryoku;
		}
		}
	}
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
//#include <cstdio>
//#include <cstdlib>
//#include <cmath>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

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

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

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

using namespace std;


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

	cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;

}