Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func main() {
	mountHeightList := make([]int64, 10)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 10; i++ {
		scanner.Scan()
		mountHeightList[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	sort.Slice(mountHeightList, func(i, j int) bool { return mountHeightList[i] > mountHeightList[j] })

	for i := 0; i < 3; i++ {
		fmt.Printf("%d\n", mountHeightList[i])
	}
}

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

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

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

int main(){

	int a[100];
	int list[4]={0,0,0,0};


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

		cin>>a[i];

		if(list[1]<a[i]){
			list[3]=list[2];
			list[2]=list[1];
			list[1]=a[i];
		}

		else if(list[2]<a[i]){
			list[3]=list[2];
			list[2]=a[i];
		}

		else if(list[3]<a[i]){
			list[3]=a[i];
		}

	}
	
	for(int j=1;j<=3;j++){
			cout<<list[j]<<endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    int mountain[10] = {0};
    int i, k, index;
    int height = 0;
    for (i = 0; i < 10; i++) {
        cin >> mountain[i];
    }
    for (i = 0; i < 3; i++) {
        height = 0;
        for (k = 0; k < 10; k++) {
            if (height < mountain[k]) {
                height = mountain[k];
                index = k;
            }
        }
        cout << height <<endl;
        mountain[index] = 0;
    }
    return 0;
}

C++: #include <cstdio>
#include <cstring>

int main()
{
	int top[3];
	memset(top, 0, sizeof(top));
	int h;
	while (scanf("%d", &h) != EOF)
	{
		for (int i = 0; i < 3; ++i)
		{
			if (top[i] < h)
			{
				for (int j = 2; j > i; --j)
					top[j] = top[j-1];
				top[i] = h;
				break;
			}
		}
	}
	for (int i = 0; i < 3; ++i)
		printf("%d\n", top[i]);

	return 0;
}

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

using namespace std;

#define LOG(...) fprintf(stderr, __VA_ARGS__)
//#define LOG(...)
#define FOR(i, a, b) for(int i=(int)(a); i<(int)(b); ++i)
#define REP(i, n) for(int i=0; i<(int)(n); ++i)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define SQ(n) (n) * (n)

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
  vi mt(10);
  REP(i, 10) cin >> mt[i];
  RSORT(mt);
  REP(i, 3) cout << mt[i] << endl;
}

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

int main(){
	std::vector<int> height;
	for (int i = 0; i < 10; i++)
	{
		int scan_num;
		std::cin >> scan_num;
		height.push_back(scan_num);
	}
	std::sort(height.begin(), height.end());
	for (int i = 10; i > 10 - 3; i--)
	{
		std::cout << height[i-1] << '\n';
	}
	return 0;

}

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

C++: #include <cstdio> #include <algorithm> using namespace std; int main(void){ int a[10]; int i; for(i=0;i<10;i++){ scanf("%d",&(a[i])); } sort(a,a+10); for(i=9;i>6;i--){ printf("%d\n",a[i]); } return 0; }

C++: #include<stdio.h>

int main()
{
    int i,j,temp,height[15];

    for(i=0;i<10;i++)
    {
        scanf("%d",&height[i]);
    }
    for(i=0;i<10;i++)
    {
        for(j=i+1;j<10;j++)
        {
            if(height[i]>height[j])
            {
                temp=height[j];
                height[j]=height[i];
                height[i]=temp;
            }
        }
    }
    for(i=9;i>6;i--)
    {
        printf("%d\n",height[i]);
    }
    return 0;
}

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

int main(){
  int h,first,second,third;
  first = second = third = -1;
  for(int i=0;i<10;i++){
     cin >> h;
     if(third < h)third = h;
     if(second < third){
       int tmp = second; second = third; third = tmp;
     }
     if(first < second){
       int tmp = first; first = second; second = tmp;
     } 
  }
  cout << first << endl << second << endl << third << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c;
    a=0;
    b=0;
    c=0;
    int r[10]={};
    for(int u=1;u<=10;u++){
        cin>>r[u];
        if(a<r[u]){
            c=b;
            b=a;
            a=r[u];
        }else if(b<r[u]){
            c=b;
            b=r[u];
        }else if(c<r[u]){
            c=r[u];
        }
    }
    cout<<a<<endl;
    cout<<b<<endl;
    cout<<c<<endl;
}

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

using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
// Welcome to my source code!

int main() {
    int m[10];
    for (int i = 0; i < 10; i++) cin >> m[i];
    sort(m, m+10, greater<int>());
    printf("%d\n%d\n%d\n", m[0], m[1], m[2]);
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void)
{
  vector<int> a(10);
  for(int i=0;i<10;i++){
    cin >> a[i];
  }
  sort(a.begin(),a.end());
  reverse(a.begin(),a.end());
  /*
    ±êÍ
    sort(a.begin(),a.end(),greater<int>());
    ÆµÄàÇ¢
   */
  for(int i=0;i<3;i++){
    cout << a[i] << endl;
  }
}

C++: #include <stdio.h>
??
int main(void)
{
????????int yama[10],i,j;
????????for(i=0;i<10;i++){
????????????????scanf("%d",&yamja[i]);
????????}
????????for(i=0;i<10;i++){
????????????????for(j=0;j<10;j++){
????????????????????????if(yama[i]<yama[j]){
????????????????????????????????a=yama[i];
????????????????????????????????????????????????????????????????yama[i]=yama[j];
????????????????????????????????????????????????????????????????yama[j]=a;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",yama[i]);
}
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
 
int main() {
	int arr[10];
	for(int i=0; i<10; i++){
		scanf("%d", &arr[i]);
	}
	int max1=arr[0];
	for(int i=0; i<10; i++){
		if(max1<arr[i]){
			max1 = arr[i];
		}
	}
	int max2 = arr[0];
	for(int i=0; i<10; i++){
		if(max2<arr[i] && arr[i]!=max1){
			max2 = arr[i];
		}
	}
	int max3 = arr[0];
	for(int i=0; i<10; i++){
		if(max3<arr[i] && arr[i]!=max1 && arr[i]!=max2){
			max3 = arr[i];
		}
	}
	printf("%d\n%d\n%d\n", max1,max2,max3);
	return 0;
}

C++: #include<iostream>
 using namespace std;
int main(){
int input[10];
int first;
int second;
int third;
for(int i=0;i<30;i++){
cin>>input[i];
if(first<input[i]){first = input[i];}
else if(second<input[i-10]){second = input[i-10];}
else if(third<input[i-20]){third = input[i-20];}
}
cout<<first<<endl;
cout<<second<<endl;
cout<<third<<endl;
return 0;

}

C++: #include<stdio.h>
int main(){
  int m[10];
  int i;
  for(i=0;i<10;i++){
    scanf("%d",&m[i]);
  }
  int j;
  for(i=0;i<10;i++){
    for(j=0;j<10;j++){
      if(m[i]>m[j]){
	int temp=m[i];
	m[i]=m[j];
	m[j]=temp;
      }
    }
  }
  for(i=0;i<3;i++){
    printf("%d\n",m[i]);
  }
  return(0);
}