Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

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

int main()
{
    const int Size = 10;
    std::vector<int> List(Size);
    for(int i = 0; i < Size; ++i){
        std::cin >> List[i];
    }
    std::sort(List.begin(), List.end(), std::greater<int>());
    
    std::cout << List[0] << std::endl;
    std::cout << List[1] << std::endl;
    std::cout << List[2] << std::endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    int mou[10];
    for(int i=0;i<10;i++)
        cin>>mou[i];
    for(int j=0;j<10;j++)
    {
        int temp=0;
        for(int i=0;i<9-j;i++)
    {
        if(mou[i]>mou[i+1])
            {int temp=mou[i];
            mou[i]=mou[i+1];
            mou[i+1]=temp;
            temp=1;}
    }
    if(temp=0)
        break;
    }
        cout<<mou[9]<<"\n"<<mou[8]<<"\n"<<mou[7]<<endl;
    return 0;
}

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

#define MAX 10

using namespace std;

int main() {

	int list[MAX];

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

	sort(list, list+MAX);
	for (int i = 0; i < 3; i++) {
		cout << list[MAX-i-1] << endl;
	}

	return 0;
}

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;
  }
}