Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

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

C++: #include<stdio.h>

int main(void){

    /* 宣言と初期化 */
    int hai[10];
    int i;
    int temp2nd;
    int temp3rd
    int tempmax;

for(i=0;i<10;i++)
{
printf("山の高さ　");
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];
    }

    for(i=0;i<=10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd)
        temp2nd=hai[i];
    }

    for(i=0;i<=10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd)
        temp3rd=hai[i];
    }

    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);

    return 0;
}

C++: #include <bits/stdc++.h>

#define MAX 1000000
#define INF 200000000
#define MOD 1000000007

typedef long long ll;
typedef unsigned long long llu;

using namespace std;

int dx[]={-1,0,1,0};
int dy[]={0,-1,0,1};

void IO()
{
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
}

int arr[15];

bool cmp(int a, int b)
{
    return a>b;
}

int main()
{
    //IO();
    for(int i=0;i<10;i++)scanf("%d",&arr[i]);
    sort(arr,arr+10,cmp);
    for(int i=0;i<3;i++)printf("%d\n",arr[i]);
    return 0;
}

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

using namespace std;

int main()
{
	int i;
	int a;
	vector<int> num;
	
	for(i=0;i<10;i++)
	{
		cin >> a ;
		num.push_back(a);
	}
	
	sort(num.begin(),num.end(),greater<int>());
	
	for(i=0;i<3;i++)
		cout << num[i] << endl;
}

C++: #include<stdio.h>
#include<stdlib.h>

int i,j,a[12];

int comp(const void *p,const void *q){
	return *(int *)q-*(int *)p;
}

int main(){
	//scanf("%d",&a[0]);
	for(i=0;i<10;i++)scanf("%d\n",&a[i]);
	
	qsort(a,10,sizeof(int),comp);
	
	printf("%d\n",a[0]);
	printf("%d\n",a[1]);
	printf("%d",a[2]);
	
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    vector<int> A(10);
    for(int i = 0; 10 > i; i++){
        cin>>A[i];
    }
    sort(A.begin(),A.end(),greater<int>());
    for(int i = 0; 3 > i; i++){
        cout << A[i] << endl;
    }
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <limits>
#include <algorithm>
#include <functional>
using namespace std;

#define REP( i, n )	for( int (i) = 0; (i) < (n); (i)++ )
#define ALL( x )	(x).begin(), (x).end()

int main() {
	vector<int> m(10);
	REP( i, 10 ) cin >> m[i];

	sort( ALL(m), greater<int>() );
	cout << m[0] << endl << m[1] << endl << m[2] << endl;
	
}

C++: #include<iostream>
#include<vector>
int main(){
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	while(1){
		int a,b=0;
		for(int j=0;j<10;j++){
			if(vec[j]>vec[j+1]&&j+1<10){
				a=0;
				a=vec[j];
				vec[j]=vec[j+1];
				vec[j+1]=a;
				b++;
			}
		}
		if(b==0)break;
	}
	for(int i=9;i>=7;i++){
		std::cout<<vec[i]<<std::endl;
	}
	return 0;
}

C++: Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.Unacceptable submission.

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

C++: #include <cstdio>
#include <set>
#include <iterator>

int main() {
    std::multiset<int> ms;
    int d;
    for (int i = 0; i < 10; ++i) {
        scanf("%d", &d);
        ms.insert(d);
    }
    for (auto i = ms.rbegin(); i != std::next(ms.rbegin(), 3); ++i) {
        printf("%d\n", *i);
    }
}

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

int main(void)
{
    int a[10];
    for (int i= 0; i < 10; ++i)
        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 main(){
	int h[2];
	int i,j;
	for(i=0;i<=2;i++) h[1] = 0;
	for(i=0;i<=9;i++){
		cin>>j;
		if(j > h[0]) {h[1] = h[0]; h[0] = j;}
		else if (j > h[1]) {h[2] = h[1]; h[1] = j;}
		else if (j > h[2]) h[2] = j;
		else continue;
	}
	for(i=0;i<=2;i++){
		cout<<h[i]<<endl;
	}
	cin>>j;
	return 0;
}

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

using namespace std;


int main(){

  vector<int>h;

  for(int i = 0; i < 10; i++){
    int t;
    cin >> t;
    h.push_back(t);
  }
  sort(h.rbegin(),h.rend());

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

C++: #include <iostream>

int main()
{
	int a[10];
	int work = 0;

	for(int i = 0;i < 10;i++)
	{
		std::cin >> a[i];
		if(a[i] > 10000)
		{
			std::cout << "値が大きすぎます" << std::endl;
			i -= 1;
		}
	}
	/*そうだ、バブルソートやろう*/

	for(int j = 0;j < 10;j++)
	{
		for(int k = 9;k > j;k--)
		{
			if(a[k] > a[k-1])
			{
				work = a[k-1];
				a[k-1] = a[k];
				a[k] = work;
			}
		}
	}

	std::cout << a[0] << std::endl;
	std::cout << a[1] << std::endl;
	std::cout << a[2] << std::endl;



	return 0;
}