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 <bits/stdc++.h>

#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORTASC(c) sort((c).begin(), (c).end())
#define SORTDESC(c, t) sort((c).begin(), (c).end(), std::greater<t>());
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \
                      << " " << __FILE__ << endl;

const double PI = acos(-1.0);

using ll = long long;
using namespace std;

int main()
{
    vector<ll> h;

    ll tmp;
    REP(i, 10){
        cin >> tmp;
        h.PB(tmp);
    }

    SORTDESC(h, ll);

    cout << h[0] << endl << h[1] << endl << h[2] << endl;

    return 0;
}

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

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

int main(void)
{
  const int dataNum = 10;

  std::vector<int> vals;
  for (int i = 0; i < dataNum; i++) {
    int newVal;
    std::cin >> newVal;
    vals.push_back(newVal);
  }

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

  const int outputDataNum = 3;
  
  for (int i = 0; i < outputDataNum; i++) {
    std::cout << vals[i] << std::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;
}

C++: #include <bits/stdc++.h>
#define SORT(a) sort(a.begin(), a.end())
#define RSORT(a) sort(a.rbegin(), a.rend())
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = n - 1; 0 <= i; i--)
#define FOR(i, start, end) for (int i = start; i < end; i++)
#define RFOR(i, start, end) for (int i = start - 1; 0 <= i; i--)
#define ALL(a) a.begin(), a.end()
using ll = long long;
using namespace std;
constexpr int INF32       = 1'050'000'000;
constexpr long long INF64 = 4'000'000'000'000'000'000;
constexpr int MOD7        = 1'000'000'007;
constexpr int MOD9        = 1'000'000'009;
template <class T> inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
void print() { std::cout << '\n'; }
template <class H, class... T> void print(H &&head, T &&... args) {
    std::cout << head;
    sizeof...(args) == 0 ? std::cout << "" : std::cout << ' ';
    print(std::forward<T>(args)...);
}
template <class T> void print(std::vector<T> &v) {
    for (int i = 0; i < v.size(); i++) {
        std::cout << v[i];
        i == v.size() - 1 ? std::cout << '\n' : std::cout << ' ';
    }
}
template <class T> void print(std::vector<std::vector<T>> &v) {
    for (int i = 0; i < v.size(); i++) {
        for (int j = 0; j < v[i].size(); j++) {
            std::cout << v[i][j];
            j == v[i].size() - 1 ? std::cout << '\n' : std::cout << ' ';
        }
    }
}
void scan() {}
template <class H, class... T> void scan(H &&head, T &&... args) {
    std::cin >> head;
    scan(std::forward<T>(args)...);
}
template <class T> void scan(std::vector<T> &v) {
    for (auto &&i : v) {
        scan(i);
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    vector<int> v(10);
    scan(v);
    RSORT(v);
    REP(i, 3) print(v[i]);

    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
 vector<int> h(10);
 rep(i,10) cin >> h[i];
 sort(h.rbegin(),h.rend());
 rep(i,3) cout << h[i] << endl;
 return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
int main(){
	int high[10] = {};
	for(int i=0; i<10; i++){
		cin >> high[i];
	}

	sort(high, high + SIZE_OF_ARRAY(high), greater<int>());

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

C++: #include <stdio.h>

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

C++: #include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main(){
    int a[10];
    for(int i=0; i<10; i++){
        cout<<"Height of mountain "<<i+1<<" ";
        cin>>a[i];
        cout<<endl;
    }
    for(int i=0; i<10; i++)
        for(int j=0; j<9-i; j++)
            if(a[j]<a[j+1])
                swap(a[j],a[j+1]);
     for(int i=0; i<3; i++)
             cout<<a[i]<<endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <queue>
#include <map>
#include <stack>
#include <list>
#include <vector>
using namespace std;
int Max1=-1;
int Max2=-1;
int Max3=-1;
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		if(n>Max1)
		{
			Max3=Max2;
			Max2=Max1;
			Max1=n;
			continue;
		}
		if(n>Max2)
		{
			Max3=Max2;
			Max2=n;
			continue;
		}
		if(n>Max3)
		{
			Max3=n;
			continue;
		}
	}
	cout<<Max1<<endl<<Max2<<endl<<Max3<<endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int yama[9];
	int x,y,z.a;
	for(x=0; x<10; x++) {
		cin >> yama[x];
	}
	for(y=0;y<10000; y++) {
		if(yama[y] > yama[y+1]) {
			z = yama[y];
			yama[y] = yama[y+1];
			yama[y+1] = z;
		}
		else {
			a++;
		}
		if(y == 8) {
			if(a == 9) {
				break;
			}
			else {
				y = 0;
				a = 0;
			}
		}
	}
	cout << yama[9] << endl;
	cout << yama[8] << endl;
	cout << yama[7] << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;
int main(){
  int a[10];
  for(int i = 0 ; i < 10 ; i++ ){
    cin >> a[i];
  }
  for(int i = 9 ; i > 0 ; i-- ){
    for(int j = 0 ; j < i ; j++ ){
      if(a[j] < a[j+1])swap(a[j],a[j+1]);
    }
  }
  cout << a[0] << endl << a[1] << endl << a[2] << endl;
  return 0;
}

C++: #include<stdio.h>
int main(void) {
	int a, b, c[12],top=0,second=0,thread=0;
	for (int i = 1; i <= 10; i++)
	{
		scanf("%d", &c[i]);
		if (c[i]>=top)
		{
			if (c[i] == top)continue;
			second = top;
			top = c[i];
		}
		else
		{
			if (c[i]>=second)
			{
				if (c[i] == second)continue;
				thread = second;
				second = c[i];
			}
			else
			{
				if (c[i]>thread)
				{
					thread = c[i];
				}
			}
		}
	}
	printf("%d\n%d\n%d\n", top, second, thread);
	return 0;
}

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

int main(){
	priority_queue<int> qu;

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

		qu.push(t);
	}

	for(int i = 0; i < 3; i ++)
	{
		cout<<qu.top()<<endl;
		qu.pop();
	}

    return 0;
}