Go: package main

import (
	"fmt"
	"sort"
)

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

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

	sort.Ints(mt)
	fmt.Printf("%d\n%d\n%d\n", mt[9], mt[8], mt[7])

}

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001&lang=jp
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <map>

using namespace std;


int main(){
	int n = 10;
	int a[n];
	for(int i=0; i<n; i++){
		cin >> a[i];
	}
	sort(a, a+n);
	printf("%d\n", a[9]);
	printf("%d\n", a[8]);
	printf("%d\n", a[7]);


	return 0;

}

C++: #include <cstdio>
#define MAX 10

int* sort(int* array);

int main(){
	int array[MAX];
	
	for(int i = 0; i < MAX; i++){
		array[i] = 0;
		scanf("%d", &array[i]);
	}
	
	sort(array);
	
	for(int i = MAX - 1; i > 6; i--){
		printf("%d\n", array[i]);
	}
	return 0;
}

int* sort(int* array){
    int temp = 0;
    for(int i = 0; i < MAX; i++){
        for(int j = 0; j < MAX - i - 1; j++){
            if(array[j] > array[j + 1]){
                temp = array[j];
                array[j] = array[j + 1];
                array[j + 1] = temp;
            }
        }
    }
    return array;
}

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

int main(){
	vector<int> h;
	for(int i=0; i<10; ++i){
		int input;
		scanf("%d", &input);

		h.push_back (input);	
	}

	std::sort(h.begin(), h.end(),std::greater<int>());

	for(int i=0; i<3; ++i) printf("%d\n", h[i]);

	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int height[10], i, a=0, b=0, c=0;
	for (i = 0; i < 10; i++) {
		cin >> height[i];
	}
	for (i = 0; i < 10; i++) {
		if (height[i] >= a) {
			c = b;
			b = a;
			a = height[i];
		}
		else if (height[i] >= b) {
			c = b;
			b = height[i];
		}
		else if (height[i] >= c) {
			c = height[i];
		}
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}

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

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

using namespace std;

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

	partial_sort( hills, hills + 3, hills+9, greater<int>() );
    
    for(int i=0;i<3;i++){
        cout << hills[i] <<endl;
    }
	return 0;
}

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<iostream>
#include<algorithm>

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

C++: #include <iostream>

int mt[] = {
1819,
2003,
876,
2840,
1723,
1673,
3776,
2848,
1592,
922
};

int main() {
	int limit = 10000;
	for ( int j = 0; j < 3; j++ ) {
		int max = 0;
		for ( int i = 0; i < 10; i++ ) {
			if ( max < mt[ i ] && mt[ i ] < limit ) {
				max = mt[ i ];
			}
		}
		std::cout << max << std::endl;
		limit = max;
	}
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
    int height[10];
    for(int i=0;i<10;i++)
    {
        scanf("%d",&height[i]);
    }
    int temp;
    for(int i=0;i<10;i++){
            for(int j=i+1;j<=10;j++){
        if(height[i]<height[j]){
                temp=height[i];
            height[i]=height[j];
            height[j]=temp;
        }

            }

    }

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

C++: #include <cstdio>
int main(){
    int input;
    int i;
    scanf("%d",&input);
    int first=0,second=0,third=0;
    for(i=0;i<9;++i){
        scanf("%d",&input);
        if(input>first){
            third=second;
            second=first;
            first=input;
        }
        else if(input>second){
            third=second;
            second=input;
        }
        else if(input>third){
            third=input;
        }
    }
    printf("%d\n%d\n%d\n",first,second,third);
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <stdio.h>
#define pri(dt) printf("%d\n",dt)
#define RPE0(loopTotal)  for(int i=0;i<=(loopTotal);i++)
#define RPE(loopTotal)  for(int i=1;i<=(loopTotal);i++)

int data[9];

using namespace std;
int main(void){
    
    RPE0(9) scanf("%d",&data[i]);
    sort(data,data+9,greater<int>());
    RPE0(2) pri(data[i]);
    data[9] = {};
}

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

#define BOGO 10

using namespace std;

int main()
{
	int arr[BOGO];
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		
		/**
		for(int j = 0; j < BOGO; j++){
			cout << arr[j] << flush;
		}
		cout << endl;
		/**/
		
		bool found = true;
		for(int j = 0; j < BOGO-1; j++){
			if(arr[j] > arr[j+1]){
				found = false;
				break;
			}
		}
		
		if(found){
			break;
		}
		random_shuffle(arr, arr+BOGO);
	}
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

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

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

int main(){
	int mountains[9] = {};

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

	for(int i = 0; i < 3; i++){
		int maxIndex = 0;
		for(int j = 0; j < 10; j++){
			if(mountains[maxIndex] < mountains[j]){
				maxIndex = j;
			}
		}
		cout << mountains[maxIndex] << endl;
		mountains[maxIndex] = -1;
	}

	return 0;

}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int d[11];
int main(){
	
	for(int i=0;i<10;i++)scanf("%d",d+i);
	std::sort(d,d+10);
	printf("%d\n%d\n%d\n",d[9],d[8],d[7]);
}

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

int main()
{
  int a[11]={0};
  int i,j,maxa,maxb,maxc;
  

  for(i=0; i<10; i++){
    scanf("%d",&a[i]);
    //    maxa=max(maxa,a[i]);
  }

  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(a[i]<a[j]){
	swap(a[i],a[j]);
      }
    }
  }

  maxa=a[0];
  maxb=a[1];
  maxb=a[2];

  printf("%d\n%d\n%d",maxa,maxb,maxc);
  
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(void)
{
	int input[10];

	for(int i = 3; i < 10; i++){
		for(int j = 0; j < 3; j++){
			if(input[i] > input[j]){
				swap(input[i], input[j]);
				break;
			}
		}
	}

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


	return 0;
}

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

int main(){
  int x, m1=0, m2=0, m3=0;

  for (int i=0; i<10; i++){
    cin >> x;
    if (x>m1){
      m3=m2; m2=m1; m1=x;
    } else if (x>m2){
      m3=m2; m2=x;
    } else if (x>m3){
      m3=x;
    }
  }

  cout << m1 << endl << m2 << endl << m3 << endl;

  return 0;
}