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 mt[10];
  int high[3];
  int height;
  

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

  for(int i=0;i<3;i++)
    {
      high[i] = 0;
    }

  for(int i=0;i<10;i++)
    {
      if(mt[i]>=high[2])
	{
	  high[2] = mt[i];
	}
      if(mt[i]>=high[1])
	{
	  high[2] = high[1];
	  high[1] = mt[i];
	}
      if(mt[i]>=high[0])
	{
	  high[2] = high[1];
	  high[1] = high[0];
	  high[0] = mt[i];
	}
    }

  for(int i=0;i<3;i++)
    {
      cout << high[i] << endl;
    }

  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
const int    INF = 100000000;
const double EPS = 1e-10;
const int    MOD = 1000000007;
using namespace std;
typedef pair<int,int> P;

int main(){
	int x[10];
	rep(i,10) cin >> x[i];
	sort(x,x+10,greater<int>());
	rep(i,3) cout << x[i] << endl;
}

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

int main(){
    int x;
    int h[3];
    for(int a=0;a<10;a++){
        cin >> x;
        if(x>h[0]){
            h[2] = h[1];
            h[1] = h[0];
            h[0] = x;
        }else if(x>h[1]){
            h[2] = h[1];
            h[1] = x;
        }else if(x>h[2]){
            h[2] = x;
        }
    }
    cout >> h[0] >> "\n" h[1] >> "\n" h[2] >> "\n";
    return 0;
}

C++: #include <iostream>

using namespace std;

void buble_sort(int high[]){
    int i,j,v,k;

    for(i = 0;i < 9;i++){
        v = i;
        for(j = i;j <= 9;j++){
            if(high[v] < high[j]){
                v = j;
            }
        }
        int box = high[i];
        high[i] = high[v];
        high[v] = box;

    }
}

int main() {
    int i,high[10];

    for (i = 0;i <= 9;i++){
        cin >> high[i];
    }

    buble_sort(high);

    cout << endl;

    for(i = 0;i <= 2;i++){
        cout << high[i];
        if(i != 2){
            cout << ' ';
        }
        else {
            cout << endl;
        }
    }

    return 0;
}

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

int main() {
	multimap<int, greater<int>> mp; int temp; int c = 0;
	while (cin >> temp) { mp[c] = temp; c++; }
	for (int i = 0; i < 3; i++) cout << mp[i] << endl;
	return 0;
}

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

using namespace std;

int main (void){
    int mountain_height[10];
    for (int i = 0; i < 10; i++) cin >> mountain_height[i];
    sort(&mountain_height[0],&mountain_height[0]+10,std::greater<int>());
    for (int i = 0; i < 3; i++) cout << mountain_height[i] << endl;
}

C++: #include<stdio.h>
int main(void){
	int i;
	int a[10];
	int x=0, y=0, z=0;
	
	for(i=0;i<10;i++){
		do{
			printf("山の高さ%d(整数)",i+1);
			scanf("%d",&a[i]);
		}while(a[i]<0||10000<a[i]);
		
		if(a[i]>x){
			z=y;
			y=x;
			x=a[i];
		}
		else if(a[i]>y){
			z=y;
			y=a[i];
		}
		else if(a[i]>z){
			z=a[i];
		}
	}
	
	printf("%d\n%d\n%d\n",x,y,z);
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a[10],x,y;
	for (int n = 0; n < 10; n++) {
		cin >> a[n];
	}
	for (int j = 0; j < 10; j++) {
		for (int i = 0; i < 9; i++) {
			if (a[i] < a[i + 1]) {
				x = a[i];
				y = a[i + 1];
				a[i] = y;
				a[i + 1] = x;
			}
		}
	}
	cout << a[0] << endl << a[1] << endl << a[2] << endl;
	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
 
int main(){
int rank[3],a[10],i = 0,ii = 0;
rank[0] = 0;
rank[1] = 0;
rank[2] = 0;
while(i <= 9){
	cin >> a[i];
	while(ii <= 2){
		if(rank[ii] < a[i]){			
			if(ii == 0){			
			rank[2] = rank[1];
			rank[1] = rank[0];
			rank[0] = a[i];
			if(ii == 1){
			rank[1] = rank[0];
			rank[0] = a[i];
			}
			if(ii == 2)
			rank[2] = a[i];
			}
			break;	
		}
		ii++;
	}
i++;
ii = 0;

}
cout<<rank[0]<<endl<<rank[1]<<endl<<rank[2]<<endl;




}

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

C++: N = 10
a = []
for i in range(N):
    a.append(input()) # ３度の入力に対して、1, 2, 3 と入力。
print(a) # ['1', '2', '3']

C++: #include<iostream>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)std::cin>>a[i];std::sort(a,a+10);std::cout<<a[9]<<a[8]<<a[7]<<"\n";}

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

int main()
{
    int first = 0;
    int second = 0;
    int third = 0;
    std::array<int, 10> arr;

    for (int i = 0; i < 10; i++) {
        std::cin >> arr.at(i);
        if (arr.at(i) >= first) {
            third = second;
            second = first;
            first = arr.at(i);
        } else if (arr.at(i) >= second) {
            third = second;
            second = arr.at(i);
        } else if (arr.at(i) >= third) {
            third = arr.at(i);
        }
    }

    std::cout << first << std::endl
              << second << std::endl
              << third << std::endl;
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <queue>

using namespace std;

int main()
{
	int buf;
	priority_queue<int> qu;

	for ( int i = 0; i < 10; i++ )
	{
		cin >> buf;
		qu.push( buf );
	}

	for ( int i = 0; i < 3; i++ )
	{
		printf("%d\n", qu.top() );
		qu.pop();
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
  
int main(){
  
    int height[10];
    int TopOfThree[3];
 
    for(int i = 0;i < 10;i++)
       cin >> height[i];
 
    for(int i = 0;i < 3;i++)
    {
         int index;
        TopOfThree[i] = height[0];
        for(int j = 1;j < 10 - i;i++)
        { 
             if(TopOfThree[i] < height[j])
             {
                  TopOfThree[i] = height[j];
                  index = j;
             }
        }
 
        for(int k = index;k < 10;k++)
        {
            if(k == 9)
              height[k] = 0;
           else
              height[k] = height[k + 1];
        }
     }
 
     cout << TopOfThree[0] << endl << TopOfThree[1] << endl << TopOfThree[2] << 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", 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>
#include <deque>
#include <algorithm>
#include <functional>

using namespace std;

void Top3Mountains(int m1,int m2,int m3,int m4,int m5,int m6,int m7,int m8,int m9, int m10)
{
	if ( m1 >= 0 && m1 <= 10000 &&
		m2 >= 0 && m2 <= 10000 &&
		m3 >= 0 && m3 <= 10000 &&
		m4 >= 0 && m4 <= 10000 &&
		m5 >= 0 && m5 <= 10000 &&
		m6 >= 0 && m6 <= 10000 &&
		m7 >= 0 && m7 <= 10000 &&
		m8 >= 0 && m8 <= 10000 &&
		m9 >= 0 && m9 <= 10000 &&
		m10 >= 0 && m10 <= 10000
		){
			deque<int> mountains;
			mountains.push_back(m1);
			mountains.push_back(m2);
			mountains.push_back(m3);
			mountains.push_back(m4);
			mountains.push_back(m5);
			mountains.push_back(m6);
			mountains.push_back(m7);
			mountains.push_back(m8);
			mountains.push_back(m9);
			mountains.push_back(m10);

			sort(mountains.begin(),mountains.end(),greater<int>());

			deque<int>::iterator it = mountains.begin();

			int i=0;
			for(i=0;i<3; i++){
				cout << *it << endl;
				it++;
			}
	}
}

int main()
{

	Top3Mountains(1819,2003,876,2840,1723,1673,3776,2848,1592,922);
	return 0;
}