Go: package main

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

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; 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 <iostream>
using namespace std;
  
int a[3],n;
  
int main(){
  a[0] = 0;
  a[1] = 0;
  a[2] = 0;
  for(int i = 0; i < 10; i++){
    cin >> n;
    if(a[2] > n){
    }else{
      if(a[1] > n){
        a[2] = n;
      }else{
        if(a[0] > n){
          a[2] = a[1];
          a[1] = n;
        }else{
          a[2] = a[1];
          a[1] = a[0];
          a[0] = n;
        }
      }
    }
  }
  cout << a[0] << endl << a[1] << endl << a[2] << endl;
}

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

int main() {
  array<int,10> a;
  for(int &i: a) cin >> i;
  sort(a.begin(),a.end(),greater<int>());
  for(int i: {0,1,2}) cout << a[i] << endl;
  return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
int big1;
cin >> big1;
int big2=0;
int big3=0;
int input;
for(int i=2;i<=10;i++)
{cin >> input;
if(input>=big1 && input>=big2 && input>=big3)
{big3=big2;
big2=big1;
big1=input;}
else if(input>=big2 && input>=big3)
{big3=big2;
big2=input;}
else if(input>=big3)
{big3=input;}
}
cout << big1 << endl << big2 << endl << big3 << endl;
return 0;
}

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

int main(){

	int a[11],max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[1];

	for (i=2; i<11; i++){
		if (max1 < a[i]){
			swap (max1,a[i]);
		}
	}
	max2 = a[2];

	for (i=3; i<11; i++){
		if (max2 < a[i]){
			swap (max2,a[i]);
		}
	}
	max3 = a[3];

	for (i=4; i<11; i++){
		if (max3 < a[i]){
			swap (max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

int main(){
	
	int mt[10];
	int i, s, t, tmp, j;
	
	for(i=0; i<10; i++){
		cin >> mt[i];
	}
	
	for(s=0; s<9; s++){
		for(t=s+1; t<10; t++){
			if(mt[t] > mt[s]){
				tmp = mt[t];
				mt[t] = mt[s];
				mt[s] = tmp;
			}
		}
	}
	
	for(j=0; j < 3; j++){
		cout << mt[j] << endl;
	}
	

	return 0;
	
}

C++: #include<iostream>
#include <vector>
#include<algorithm>
#define REP(i,n) for(int i=0;i<(int)n;++i)

using namespace std;

void solver() {
    vector<int> m;
    REP(i,10){
        int n;
        cin>>n;
        m.push_back(n);
    }
    sort(m.begin(),m.end(),greater<int>());
    REP(i,3){
        cout<<m[i]<<endl;
    }
}

int main() {
    solver();
    return 0;
}

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

int main(int , char *[])
{
int a[10];
int b[10];
for(int i=0;i<10;i++)
{
cin>>a[i];
for(int j=0;j<10;j++)
{
if(a[i]>b[j])
{
for(int k=10-j;k>0;k--)
{
b[j+k]=b[j+k-1];
}
b[j]=a[i];
break;
}
}
}
for(int n=0;n<3;n++)
{
cout<<b[n]<<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 moun[10];
    int temp;
    
    
    for(int i=0;i<10;i++)
        cin >> moun[i];

    
        for(int i=0;i<9;i++){
        for(int j=i+1;j<10;j++){
            if(moun[i]<moun[j]){
               temp = moun[i];
               moun[i] = moun[j];
               moun[j] = temp;
            }
        }
    }

    for(int i=0;i<3;i++){
        cout << moun[i] << 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};

	cout << "10????????????????¨?????????????????????????" << endl;
	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];
	}

	cout << "??????3???????????????";
	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 arr[10];
	for(int i=0; i<10; i++)
	cin>>arr[i];
	sort(arr, arr+10, greater<int>());
	for(int i=0; i<3; i++) {
		cout<<arr[i]<<endl;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG true
// sort(a.begin(), a.end(), std::greater<int>());

/*
std::vector<std::string> split(const std::string &input, char delimiter)
{
    std::istringstream stream(input);

    std::string field;
    std::vector<std::string> result;
    while (std::getline(stream, field, delimiter))
    {
        result.push_back(field);
    }
    return result;
}
*/

int main()
{
    vector<int> a(10);
    rep(i, 10)
    {
        cin >> a[i];
    }
    SORT(a);
    for (int i = 9; i > 6; i--)
    {
        cout << a[i] << endl;
    }
    return 0;
}

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

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	
	sort(x);
	
	cout <<x[9] <<endl;
	cout <<x[8] <<endl;
	cout <<x[7] <<endl;
		
		
		
	
	return 0;
}

C++: #include <stdio.h>

int main(){
	int height[10], rank[3] = {0};
	int i;
	
	for(i = 0; i < 10; i++){
    	scanf("%d\n", &height[i]);

        if (rank[0] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = rank[0];
        	rank[0] = height[i];
        }else if (rank[1] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = height[i];
        }else if (rank[2] < height[i]){
        	rank[2] = height[i];
        }
    }

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

	return 0;
}

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

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

int main(){
	int mount[10];
	int i;
	for (i = 0; i < 10; i++) {
		cin >> mount[i];
	}
	int top = 0;
	int second = 0;
	int third = 0;

	for (i = 0; i < 10; i++) {
		if (third <= mount[i]){
			third = mount[i];
			if (second < mount[i]){
				third = second;
				if (top <= mount[i]){
					second = top;
					top = mount[i];
				}
				else
				{
					second = mount[i];
				}
			}
		}
	}

	cout << top << endl << second << endl << third << endl;
	cin >> i;
	return 0;
}

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

C++: #include<iostream>
#define element 10

using namespace std;

int height[element];
int number;
int main()
{
 for(int i=0;i<element;++i)
 {
  cin >> height[i];
 }
 for(int i=0;i<element;++i)
 {
  for(int j=i;j<element;++j)
  {
   if(height[i]<height[j])
   {
    number = height[i];
    height[i] = height[j];
    height[j] = number;
   }
  }
 }
 printf("%d\n%d\n%d\n",height[0],height[1],height[2]);
 return 0;
}