Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

C++: #include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;
long long int a[1000];
int main()
{
    //int i,j;

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

    for(int j=9;j>=7;j--)
    printf("%lld\n",a[j]);
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int m1 = -1;
int m2 = -2;
int m3 = -3;
int m;

int main() {
    for (int i=0; i<10; i++) {
        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 << "\n" << m2 << "\n" << m3 << endl;

}

C++: #include<cstdio>

int main(){
  int data[10],order[10];

  //入力＆初期化
  for(int i=0;i<10;i++){
    scanf("%d",&data[i]);
    order[i]=1;
  }

  //順位付け
  for(int i=1;i<10;i++)
    for(int j=0;j<i;j++){
      if(data[j]<data[i]) order[j]++;
      if(data[j]>=data[i]) order[i]++;
    }

  //表示
  for(int i=1;i<=3;i++)
    for(int j=0;j<10;j++)
      if(order[j]==i)
	printf("%d\n",data[j]);
   
  return 0;
}

C++: #include <stdio.h>
#include <algorithm>
#include <vector>
#include <functional> 

#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define REP(i,n) FOR(i,0,n)
 
int main()
{
  int n;
  std::vector<int> d;
  REP(i,10) {
      scanf("%d", &n);;
      d.push_back(n);
  }
  std::sort(d.begin(), d.end(), std::greater<int>() );
  printf("%d\n",d[0]);
  printf("%d\n",d[1]);
  printf("%d\n",d[2]);
   
  return 0;
}

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

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

		if(0 > a[i]) i--;
		if(10000 < a[i]) i--;

	}

	for(i=0;i<10;i++){
  for(j=i+1;j<10;j++){
 if(a[i] < a[j]){
  k = a[j];
  a[j] = a[i] ;
  a[i] = k ;
 }
 }
 }
 for(i=0;i<3;i++){
  cout << a[i] <<"\n" ;
 }

    return 0;
}

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

int main()
{
  int first = 0, second = 0, third = 0;
  for (int i = 0; i < 10; i++) {
    int n;
    cin >> n;
    if (n > first) {
      third = second;
      second = first;
      first = n;
    } 
    else if(n > second) {
      third = second;
      second = n;
    }
    else if(n > third) {
      third = n;
    }
  }
  cout << first << "\n" << second << "\n" << third << endl;
  return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
	int m[11],t;
	for(int i=1;i<=10;i++)
	{
		cin>>m[i];
	}
	for(int i=1;i<=10;i++)
	{
		for(int j=1;j<=10;j++)
		{
			if(m[i]<m[j])
			{
				t=m[i];
				m[i]=m[j];
				m[j]=t;
			}
		}
	}
	cout<<m[10]<<endl;
	cout<<m[9]<<endl;
	cout<<m[8]<<endl;
	return 0;
}

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

int main()
{
	const int N = 10;
	int A[N];
	const int M = 3;
	int top[M] = {0};

	for(int i = 0; i < N; i++)
		cin>>A[i];

	for(int i = 0; i < N; i++)
	{
		if(top[0] < A[i])
		{
			top[2] = top[1];
			top[1] = top[0];
			top[0] = A[i];
		}
		else if(top[1]<A[i])
		{
			top[2] = top[1];
			top[1] = A[i];
		}
		else if(top[2] < A[i])
			top[2] = A[i];
	}


	for(int i = 0; i < M; i++)
		cout <<top[i] << ' ';
	cout<<endl;

	return 0;
}

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

int main(){
  int t[10];
  for(int i=0;i<10;i++){
    cin>>t[i];
  }
  sort(t,t+10,greater<int>());
  cout<<t[0]<<endl;
  cout<<t[1]<<endl;
  cout<<t[2]<<endl;
}

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

int main(){
	int yama[10];
	
	int one,two;//??????????????¨
	for(int k=0; k<10; k++){
		for(int i=0; i<9; i++){
			if(yama[i] > yama[i+1]){
				one = yama[i];
				two = yama[i+1];
				yama[i] = two;
				yama[i+1] = one;
			}
		}
	}

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

	return 0;
}

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

C++: #include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>

#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007

using namespace std;

int main(void) {
	int a[10];
	FOR(i, 0, 9) {
		cin >> a[i];
	}
	sort(a, a + 10);
	cout << a[9] << endl;
	cout << a[8] << endl;
	cout << a[7] << endl;
	return 0;
}

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

int Hills[10];

void Sort(int array[],int n)
{
	int i,j,temp;
	
	for (i = 0;i < n - 1;i++) {
		for (j = 0;j < n - 1;j++) {
			if (array[j + 1] < array[j]) {
				temp = array[j];array[j] = array[j + 1];array[j + 1] = temp;
			}
		}
	}
}


int main(){

	cin >> Hills[0] >> Hills[1] >> Hills[2] >> Hills[3] >> Hills[4] >> Hills[5]
	>> Hills[6] >> Hills[7] >> Hills[8] >> Hills[9];

	Sort(Hills,10);

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


	return 0;
}

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

int main () {

int a[3] = {-1, -1, -1};
int n;


    while(!cin.eof()) {

    cin >> n;

    if (n > a[0]) {
        a[2] = a[1];
        a[1] = a[0];
        a[0] = n;

    }

    else if (n < a[0] && n > a[1]) {
        a[2] = a[1];
        a[1] = n;
    }

    else if (n < a[1] && n > a[2]) {
        a[2] = n;
    }

    }

    for (int i = 0; i < 3; i++)
    cout << (i+1) << ". " << a[i] << endl;


    return 0;


}

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

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

  for(int i=0; i<3; i++)
  {
    int max = 0;
    for(int j=0; j<9; j++)
    {
      if ( m[max] < m[j+1] ) max = j+1;
    }
    cout << m[max] << endl;
    m[max] = -1;
  }
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <bitset>
#include <set>
#include <queue>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,b,n) for(int i=b;i<n;i++)

const float PI = 3.1415926;
static const int INFTY = (1<<30);

using namespace std;

typedef long long ll;
typedef long double ld;

int main() {
  vector<int> v;
  int n;
  rep(i,10){
    cin >> n;
    v.push_back(n);
  }
  sort(v.begin(), v.end(), greater<int>());
  cout << v[0] << endl;
  cout << v[1] << endl;
  cout << v[2] << endl;
  

  return 0;
}

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

int main()
{
	array<int, 10> height;
	int i = 0;

	while ( i < 10 )
	{
		cin >> height[i];
		i = i + 1;
	}

	
	sort( height.begin(), height.end() );
	for ( i = 9 ; i > 6; i = i - 1 )
	{
		cout << height[i] << endl;
	}

	return 0;
}

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

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

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

using namespace std;

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