Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mountains := make([]int, 10, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mountains[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

	for i := 0; i < 3; i++ {
		fmt.Println(mountains[i])
	}
}

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

int main(){

  int x,a=0,b=0,c=0,q=0,p=0;

  for(int i=0;i<10;i++){
   cin >> x;
  
   if(x>c){
    if(x>b){
      if(x>a){
	q=a;
	a=x;
      }
      if(q!=0){
	p=b;
	b=q;
      }else{
	p=b;
	b=x;
      }
    }
    if(p!=0){
      c=p;
    }else{
      c=x;
    }
   }
   p=0;
   q=0;
  }
      
  cout << a << endl;
  cout << b << endl;
  cout << c << endl;
	  
	  





  return 0;
}

C++: #include <iostream>
#include <array>
#include <algorithm>
 
int main(void) {
    std::array<u_int, 10> heights;
    //??\???
    for (u_int i = 0; i < 10; ++i) {
        std::cin >> heights[i];
    }
    //?????????
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
    //??????
    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights[i] << std::endl;
    }
    return 0;
}

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

const int N = 10;

int main()
{
	vector<int> A(N);
	FOR(i,0,N){
		cin >> A [i];
	}
	sort(ALL(A),greater<int>());

	FOR(i,0,3){
		cout << A [i] << endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int M[10];

void bubbleSort(int M[], int N) {
	int flag = 1;
	while (flag) {
		flag = 0;
		for (int i = N - 1; i > 0; --i) {
			if (M[i - 1] > M[i]) {
				int t = M[i];
				M[i] = M[i - 1];
				M[i - 1] = t;
				flag = 1;
			}
		}
	}
}

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

	bubbleSort(M, 10);

	for (int i = 1; i < 4; ++i) {
		cout << M[10 - i] << " ";
	}
	cout << endl;
}

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

C++: #include <bits/stdc++.h>
#define IN(a) scanf("%d",&a);
#define REPT(i,n) for (int i=1;i<=(n);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RER(i,n,m) for (int i=m;i>(m-n);i--)
#define BR break;

using namespace std;

int main(){
	int a[10];

	REP(i,10)
	{
		IN(a[i]);
	}
	sort(a,a+10);

	RER(i,3,9){
		printf("%d\n",a[i]);
	}

	return 0;
 }

C++: #include<iostream>
using namespace std;
int main(){
  int x, buf, i, j;
  int top[3];
  for(i = 0; i < 3; i++)
    top[i] = 0;

  for(i = 0; i < 10; i++){
    cin >> x;
    if(x > top[2]){
      top[2] = x;
      j = 2;
      while(j > 0){
        if(top[j-1] <top[j]){
          buf = top[j-1];
          top[j-1] = top[j];
          top[j] = buf;
          j--;
        }else{
          break;
        }
      }
    }
  }

  for(i = 0; i<3; i++)
    cout << top[i] << '\n';

  return 0;
}

C++: #include<stdio.h>
int main(){
    int l[10],r[10]={-1};
    int i,j,k,c[10],n=0;
    for(i=0;i<10;i++){
        c[i]=11;
    }
    for(i=0;i<10;i++){
        scanf("%d",&l[i]);
    }
    for(j=0;j<10;j++){
        for(i=0;i<10;i++){
            for(k=0;k<10;k++){
                if(c[k]==i){
                    n=1;
                }
            }
            if(!(n==1)){
                if(l[i]>=r[j]){
                    r[j]=l[i];
                    c[j]=i;
                }
            }
            n=0;
        }
    }
    for(i=0;i<3;i++){
        printf("%d\n",r[i]);
    }
    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);
    cout<<arr[9]<<endl;
    cout<<arr[8]<<endl;
    cout<<arr[7]<<endl;
}

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

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

int main(){
	std::vector<int>v(10);
	for(int i=0;i<10;i++){
		int a;std::cin>>a;
		v[i]=a;
	}
	std::sort(v.begin(),v.end());
	std::cout<<v[9]<<std::endl;
	std::cout<<v[8]<<std::endl;
	std::cout<<v[7]<<std::endl;
	return 0;
}

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

int main()
{
	int max = 0;
	int max2 = 0;
	int max3= 0;
	int a[10];
	bool flag = false;

	for (int i = 0; i < 10; i++) {
		scanf("%d", &a[i]);
		if (max < a[i]) max = a[i];
	}
	
	for (int i = 0; i < 10; i++) {
		if (!flag && a[i] == max) {
			flag = true;
			a[i] = 0;
		}
		if (max2 < a[i]) max2 = a[i];
	}

	flag = false;

	for (int i = 0; i < 10; i++) {
		if (!flag && a[i] == max2) {
			flag = true;
			a[i] = 0;
		}
		if (max3 < a[i]) max3 = a[i];
	}
		printf("%d\n", max);
		printf("%d\n", max2);
		printf("%d\n", max3);

		return (0);
	
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;

bool fn(int a, int b) {
    if (a > b) return true;
    
    return false;
}


int main() {
	int N = 10;
	int height;
	vector<int> mountains;
	
	while (N--) {
	    scanf("%d", &height);
	    
	    mountains.push_back(height);
	}
	
    sort(mountains.begin(), mountains.end(), fn);
    
    printf("%d\n", mountains.at(0));
    printf("%d\n", mountains.at(1));
    printf("%d\n", mountains.at(2));
	
	return 0;
}

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

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

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

int main()
{
    
    int i = 10,m[10];
    
    while(i>0){
        cin >> m[i];
        i--;
    }
    
    int max = m[0],index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;
    m[index] = 0;
    
    max = m[0];
    index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;
    m[index] = 0;
    max = m[0];
    index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;

    m[index] = 0;
    
    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++)
		{
			t=m[i];
			m[i]=m[j];
			m[j]=t;
		}
	}
	cout<<m[1]<<endl;
	cout<<m[2]<<endl;
	cout<<m[3]<<endl;
	return 0;
}