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++: //	created : 16/03/15
// 	author   : Rp7rf
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <set>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a ; i ++)
#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define vi vector<int>
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define INF 1e9
 
int main(void){
    int q;
    string a,b;
    cin>>q;
    while(q--){
        cin>>a>>b;
        int dp[1010][1010] = {0};
        for(int j = 0 ; j < a.size() ; j ++){
            for(int i = 0 ; i < b.size() ; i ++){
                if(a[j] == b[i]){
                    dp[j+1][i+1] = dp[j][i]+ 1;
                }else{
                    dp[j+1][i+1] = max(dp[j][i+1],dp[j+1][i]);
                }
            }
        }
        cout<<dp[a.size()][b.size()]<<endl;
    }
}

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

using namespace std;

int main() {
	int h[10];
	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<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int i,j,arr[20];

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

sort(arr,arr+3);
printf("%d\n",arr[i]);
}
return 0;
}

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

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

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

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

using namespace std;

int m[10];

int main() {

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

    sort(m, m + 10);

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

    return 0;
}

C++: // List_of _Top_3_Hills.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include <stdio.h>

#define sort 10

int main()
{
	int bab[sort], temp;
	for (int n = 0; n < sort; n++)
	{
		scanf("%d", &bab[sort]);
	}
	for (int i = 0; i < sort - 1; i++)
	{
		for (int j = sort -1; j > i; j--)
		{
			if (bab[j - 1] < bab[j])
			{
				temp = bab[j];
				bab[j] = bab[j - 1];
				bab[j - 1] = temp;
			}
		}
	}
	for (int m = 0; m < 3; m++)
	{
		printf("%d\n", bab[m]);
	}
	return 0;
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define X real()
#define Y imag()
#define value(x,y,w,h) (x >= 0 && x < w && y >= 0 && y < h)
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

typedef long long ll ;
typedef deque<int> di ;
typedef deque<ll> dl ;
typedef map<string,int> dict;
typedef complex<double> comd;
typedef pair<int,int> pii;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

double CalcDist(comd p1, comd p2){
  return sqrt(pow(p1.X - p2.X,2.0) + pow(p1.Y -p2.Y,2.0));
}

template <typename T>
void out(deque < T > d)
{
  for(size_t i = 0; i < d.size(); i++)
  {
    debug(d[i]);
  }
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}
int v[10000];
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int i = 0;
  while(cin>>v[i]) ++i;
  gsort(v,v+10000);
  cout << v[0] << "\n"<<v[1]<<"\n"<<v[2]<<"\n";
  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++: #include<iostream>
#include<string>
#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[10]<<endl<<a[9]<<endl<<a[8]<<endl;
  return 0;
}

C++: #include<stdio.h>

main()
{
long long int tall[10];
int c,i,temp;
 
for(i=0;i<10;i++){
scanf("%d",(tall+i));
}

for(i=0;i<10;i++){
for(c=i+1;c<10;c++){
if(tall[i]<tall[c]){
temp=tall[c];
tall[c]=tall[i];
tall[i]=temp;
}
}
    
}
  
for(i=0;i<3;i++){
printf("%d\n",tall[i]);
}
return 0;
}

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

using namespace std;

int main(void){
  int Mou[10];
  int i;
  int n = 0;

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

  sort(Mou , Mou + n);

    cout << Mou[n-1] << endl;
    cout << Mou[n-2] << endl;
    cout << Mou[n-3] << endl;
  
    return 0;
}

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

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

int main(){
int a[10];
int b;
int c;
int d;
int e;
c=0;
d=0;
e=0;
b=0;
while(b<10){
cin >> a[b];
if(c<a[b]){e=d;
           d=c;
           c=a[b];}
else if(d<a[b]){e=d;
                d=a[b];}
else if(e<a[b]){e=a[b];}
b=b+1;
}          
cout << c;
cout << d;
cout << e;
    return 0;
}

C++: int main()
{
	int i,j;
	int rank1 = 0;
	int mountain[10] = {0};
	for (i = 0; i < 10; i++) {
		scanf_s("%d", &mountain[i]);
	}



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

			if (mountain[j] > mountain[i])
			{
				rank1 = mountain[i];
				mountain[i] = mountain[j];
				mountain[j] = rank1;
			}
		}
	}

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

		}
	
	


    return 0;
}