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++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int main()
{
	vector<int> h(10);

	for (int i = 0; i < h.size(); i++)
	{
		cin >> h.at(i);
	}

	sort(h.begin(), h.end());
	reverse(h.begin(), h.end());

	for (int i = 0; i < 3; i++)
	{
		cout << h.at(i) << endl;
	}

}

C++: #include<stdio.h>

int main(){
	int i,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	int temp=0,j;
	for(j=0;j<10;j++){
		for(i=0;i<9;i++){
			if(h[i]<h[i+1]){
				temp=h[i];
				h[i]=h[i+1];
				h[i+1]=temp;
			}
		}
	}
	for(j=0;j<3;j++){
		printf("%d\n",h[j]);
	}
	return 0;
}

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

int main(void){

	int n=10, h1, h2, h3, h0;
	for (int i=1; i<n; i++){
		cin>>h0;
		if (h0>h1) swap(h0, h1);
		if (h0>h2) swap(h0, h2);
		if (h0>h3) swap(h0, h3);
	}
	cout<<h1<<endl;
	cout<<h2<<endl;
	cout<<h3<<endl;

	return 0;
}

C++: #include <iostream>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    priority_queue< int,vector<int>,less<int> > que;
    int in;
 
    for(int i = 0; i < 10; i++){
        cin >> in;
        que.push(in);
    }
 
 
    for(int j = 0; j < 3; j++){
        cout << que.top() << '\n';
        que.pop();
    }
 
    return 0;
}

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

int main()
{
    long long a[10];

    for(int i=0; i<10; i++)     scanf("%lld", &a[i]);

    sort(a, a+10);

    printf("%lld\n%lld\n%lld\n", a[9],a[8], a[7]);

    return 0;
}

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

int main(){
	int nyuryoku,high=0,low=0,middle=0,flag=0;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	flag++;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else
				middle = nyuryoku
			}else
				low = nyuryoku;
		}
		}
	}
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}

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

int main()
{
    int a[1000],i,n;
    n=10;
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }

    sort(a,a+n);

    int j;
    for(j=i-1;j>=7;j--)
    {
        printf("%d\n",a[j]);
    }


    return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
	vector<int> line;
	int pro;
	for(int i=0;i<10;++i)
	{
		cin>>pro;
		line.push_back(pro);
	}
	sort(line.begin(),line.end());
	for(int i=9;i>6;--i)
	{
		cout<<line[i]<<endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main ()
{
    int a[10], i, j, temp, t;
    
    for (i=0; i<10; i++){
        scanf("%d", &a[i]);
    }
    for (i=0; i<10; i++){
        for (j=i+1; j<10; j++){
            if (a[i]<a[j])
            {
                temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
        }
    }

        printf("%d\n", a[0]);
        printf("%d\n", a[1]);
        printf("%d\n", a[2]);
    

    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()
#define print(s) cout << (s) << endl

int main() {
    vector<int> v;
    int n;
    while(cin >> n) {
        v.push_back(n);
    }
    sort(v.begin(), v.end(), greater<int>());
    cout << v[0] << endl;
    cout << v[1] << endl;
    cout << v[2] << endl;
}

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

int main(){
    int a[10];
    for(int i=0;i++<10;){
        cin >> a[i];
    }
    sort(a,a+10,greater<int>());
    for(int i=0;i++<3;){
        cout << a[i] << endl;
    }
    return 0;
}

C++: #include <stdio.h>

int main() {
    
    int n = 0, m = 0, l = 0;
    
    int i, tmp;
    for (i = 1; i <= 10; i++) {
      
        scanf("%d", &tmp);
        if (n <= tmp) l = m; m = n; n = tmp; continue;
        if (m <= tmp) l = m; m = tmp; continue;
        if (l <= tmp) l = tmp; continue;
        
    }
    
    printf("%d\n%d\n%d\n", n, m, l);
    
    return 0;
}

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

void swap(int* x, int* y){
	int tmp = *x;
	*x = *y;
	*y = tmp;
}

int main(){
	int a = 0, b = 0, c = 0;
	for(int i = 0; i < 10; i++){
		cin >> c;
		if(b < c){
			swap(&b, &c);
		}
		if(a < b){
			swap(&a, &b);
		}
		if(a < c){
			swap(&a, &c);
		}
	}
	cout << a << endl;
	cout << b << endl;
	cout << c << endl;
	return 0;
}

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

int main(){
	int height[3] = {0},input;
	for(int i=0;i<10;i++){
		cin >> input;
		for(int j=0;j<3;j++){
			if(height[j] < input){
				for(int k=2;k>j;k--)
					height[k] = height[k-1];
				height[j] = input;
				break;
			}
		}
	}
	for(int i=0;i<3;i++)
		cout << height[i] <<endl;
}

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

C++: #include <stdio.h>

int num[13] ;
int ans[3] ;

int main ( )
{
	for ( int i = 0 ; i < 10 ; i++ ) {
		scanf ( "%d" , &num[i] ) ;
	}
	ans[0] = num[0] ;
	ans[1] = ans[2] = 0 ;
	for ( int i = 1 ; i < 10 ; i++ ) {
		if ( num[i] > ans[0] ) {
			ans[2] = ans[1] ;
			ans[1] = ans[0] ;
			ans[0] = num[i] ;
		}
		else if ( num[i] > ans[1] && num[i] < ans[0] ) {
			ans[2] = ans[1] ;
			ans[1] = num[i] ;
		}
		else if ( num[i] > ans[2] && num[i] < ans[1] ) {
			ans[2] = num[i] ;
		}
	}
	for ( int i = 0 ; i < 3 ; i++ ) {
		printf ( "%d\n" , ans[i] ) ;
	}
	return 0 ;
}

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

using namespace std;
 
int main(){
  int x[10],tmp,i,j;

  for(i=0; i<10; ++i)
    cin >> x[i];

  sort(x,x+10,greater<int>());

  for(i=0; i<3; ++i)
    cout << x[i] << "\n";

    return 0;
}

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

void swap(int *b, int *c)
{
    int tmp;
    tmp = *b;
    *c = *b;
    *b = tmp;
}

int main(void){

	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 (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(&max1,&a[i]);
		}
	}
	max2 = a[2];

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

	for (int 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>
#include<algorithm>
//#include<cmath>
using namespace std;
int main() {
	int i;
	int A[10001];
	for (i = 0; cin >> A[i]; i++);
	sort(A, A + i);
	cout << A[i - 1] << endl << A[i - 2] << endl << A[i - 3] << endl;
	return 0;
}

C++: #include <stdio.h> 
using namespace std; 
int main(){

 int count[10001],
tmp,num=3;
 
for(int i=0;i<10001;i++){

count[i]=0;

 for(int i=0;i<10;i++){

 scanf("%d",&tmp);
 count[tmp]++; 
} 

for(int i=10000;i>=0&&num>0;i--){ 

if(count[i]>0){ 

for(int k=0;k<count[i]&&num>0;k++){
 printf("%d\n",i);
 num--; 
}
 } 
} 
return 0; }