Go: package main

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

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heights)))

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

C++: #include <array>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <string>
#include <algorithm>
#include <numeric>
#include <functional>
#include <iterator>
#include <tuple>
#include <utility>
#include <limits>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cstdint>
#include <cassert>

using namespace std;

#define FOR(i, start, end) for(int i = (start); i < (end); ++i)
#define REP(i, n) FOR(i, 0, n)



int main()
{
    array<int, 10> a;
    REP(i, 10) {
        cin >> a[i];
    }

    partial_sort(begin(a), begin(a)+3, end(a), greater<int>());

    REP(i, 3) {
        cout << a[i] << "\n";
    }

    return 0;
}

C++: #include <iostream>
//#include <iomanip>
//#include <vector>
#include <string>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

	int h[10];

	for (int i = 1; i <= 9; i++){
		cin >> h[i];
	}

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

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

	return 0;
}

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

int main () {

int a[3] = {-1, -1, -1};
int n;

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

    if (n > a[0]) {
        a[2] = a[1];
        a[1] = a[0];
        a[0] = n;

    }

    else if (n < a[0] && n > a[1]) {
        a[2] = a[1];
        a[1] = n;
    }

    else if (n < a[1] && n > a[2]) {
        a[2] = n;
    }

}



    for (int i = 0; i < 3; i++)
    cout << a[i] << endl;


    return 0;


}

C++: #include <stdio.h>

int
main(void)
{
	char line[80];
	int h[3] = { 0 };
	int m;

 	for (int i = 0 ; i < 10; i++) {
		if (gets(line)) {
			if (sscanf(line, "%d", &m) == 1) {
				if (m >= h[0]) {
					if (m > h[0]) {
						h[2] = h[1];
						h[1] = h[0];
						h[0] = m;
					}
				} else if (m >= h[1]) {
					if (m > h[1]) {
						h[2] = h[1];
						h[1] = m;
					}
					h[1] = m;
				} else if (m >= h[2]) {
					h[2] = m;
				}
			}
		}
 	}

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

	return 0;
}

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

using namespace std;

void solve()
{
	priority_queue<int> PQue;
	for(int i = 0; i < 10; ++i)
	{
		int temp;
		cin >> temp;
		PQue.push(temp);
	}
	for(int i = 0; i < 3; ++i)
	{
		cout << PQue.top() << endl;
		PQue.pop();
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>

int main(){

    return 0;
}

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
    
int main(){
	int data,m[10];

	
	for (int j=0;j<=9;j++){
			while(cin >> data){
			if (data<=10000 && data >= 0) {
			m[j]=data;
			break;
		}
			}
	}

for (int j=0;j<=9;j++){
for (int i=0;i<=9;i++){

	if (m[i] <= m[i+1])
		std::swap(m[i],m[i+1]);

}
}
 
for (int i=0;i<=2;i++){
cout <<  m[i] <<'\n';
}

    return 0;
}

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

int main()
{
    array<int, 10> mount;
    for (int i = 0; i < 10; i++){
        cin >> mount.at(i);
    }
    for (int j = 9; j != 6; j--){
        for (int i = 0; i < j; i++){
            if (mount.at(i) > mount.at(i+1)){
                int spare = mount.at(i);
                mount.at(i) = mount.at(i+1);
                mount.at(i+1) = spare;
            }
        }
    cout << mount.at(j) << endl;
    }
}

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

int main(){
  int h[10];
  for(int i=0;i<10;i++){
    cin>>h[i];
  }
  for(int j=0;j<10;j++){
    for(int k=0;k<9 -j;k++){
      if(h[k]<h[k+1]){
	int a=h[k],b=h[k+1];
	h[k]=b;
	h[k+1]=a;
      }
    }
  }
  for(int l=0;l<3;l++){
    cout<<h[l]<<endl;
  }
	
	
      
  
    return 0;
}

C++: #include <iostream> 
#include<cmath>
#include<iomanip>
using namespace std;  
int main()  
{  
    int x[10];
    int alter;
    int flag = 1;
    for(int i =0;i < 10;i++)
    {
    	cin>>x[i];
    	if(x[i] < 0 || x[i] > 10000)
		  break;	
	}
	while(flag == 1)
	{
		flag = 0;
		for(int i =0;i < 10;i++)
		{
			if(x[i - 1] > x[i])
			{
				alter = x[i];
				x[i] = x[i - 1];
				x[i - 1] = alter;
				flag = 1;
			}
		}
	}
	cout<<x[9]<<endl;
	cout<<x[8]<<endl;
	cout<<x[7]<<endl;
	return 0;
}

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

int main(void)
{
	unsigned h[10];
	int c = 0;

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

	do{
		int i = c;
		c = 10;
		for(int j = 9; j > i; j--) {
			if(h[j] > h[j - 1]) {
				unsigned tmp = h[j];
				h[j] = h[j - 1];
				h[j - 1] = tmp;
				c = j - 1;
			}
		}
	}while(c < 10);

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

	return 0;
}

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

int main () {
    int f;
    f = 0;
    int s;
    s = 0;
    int t;
    t = 0;
    for (int i=0;i<10;++i){
        int a;
        cin >> a;
        if (a > t){
            t = a;
        }
        if (t > s) {
            int tmp;
            tmp = s;
            s = t;
            t = tmp;
        }
        if (s > f){
            int tmpo;
            tmpo = f;
            f = s;
            s = tmpo;
        }
    }
    cout << f << endl;
    cout << s << endl;
    cout << t << endl;
    return 0;
}

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

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 <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main()
{
	vector<int> heights;
	for (int i = 0; i < 10; i++) {
		int height;
		cin >> height;
		heights.push_back(height);
	}
	sort(heights.rbegin(), heights.rend());
	for (int i = 0; i < 3; i++) {
		cout << heights[i] << endl;
	}
}

C++: #include <iostream>
#include <queue>
using namespace std;
main(){
	int c;
	priority_queue<int>  pq;

	for (int i=0;i<10;i++){
		cin >> c;
		pq.push(c);
	}
	for (int i=0;i<3;i++){
		cout << pq.top() << endl;
		pq.pop();

	}

}

C++: #include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
      
int main(void){
    /* 宣言と初期化 */
    int hai[10];
    int id[2];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
               
for(i=0;i<10;i++)
{
   cin >> hai[i];
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
    /* 計算 */
for(int j=9;j>1;j--){
    for(i=0;i<j;i++){
        /* 最大値求める */
        if(hai[j]<hai[i])
       {tempmax=hai[i];
         hai[i]=hai[j];
         hai[j]=tempmax;
        }
    }
    }
 
    /* 表示 */
    printf("%d\n",hai[9]);
    printf("%d\n",hai[8]);
    printf("%d\n",hai[7]);
               
    return 0;
}

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

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

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