Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

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

int main(){
	priority_queue<int> Q;
	for(int i=0;i<10;i++){
		int h;
		cin >> h;
		Q.push(h);
	}
	for(int i=0;i<3;i++){
		cout << Q.top() << endl;
		Q.pop();
	}
}

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

int main() {
	multiset<int, greater<int>> st; int temp; 
	while (cin >> temp) st.insert(temp);
	auto itr = st.begin();
	for (int i = 0; i < 3; i++) { cout << *itr << endl; ++itr; }
	return 0;
}

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

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

int main()
{
    int x[10];
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        cin >> x[i];
    int first = 0;
    unsigned first_num;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > first) {
            first = x[i];
            first_num = i;
        }
    int second = 0;
    unsigned second_num;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > second && i != first_num) {
            second = x[i];
            second_num = i;
        }
    int third = 0;
    unsigned third_num;
    for (unsigned int i = 0; i < (sizeof(x) / sizeof(int)); i++)
        if (x[i] > third && i != first_num && i != second_num) {
            third = x[i];
            third_num = i;
        }
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
}

C++: #include <stdio.h>
int main(void){
    int a=0,b=0,c=0,n,t;
    while(scanf("%d",&n)){
        if(n>a)t=n,n=a,a=t;
        if(n>b)t=n,n=b,b=t;
        if(n>c)c=n;
    }
    printf("%d\n%d\n%d\n",a,b,c);
    return 0;
}

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

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

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

int main()
{
	vector<int> HeightOfMountain(10);
	for(int i = 0; i < 10; i++){
		cin >> HeightOfMountain[i];
	}
	sort(HeightOfMountain.begin(), HeightOfMountain.end(), greater<int>());
	cout << HeightOfMountain[0] << endl;
	cout << HeightOfMountain[1] << endl;
	cout << HeightOfMountain[2] << 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(){
  int a[10];
  for(int i = 0; i < 10; i++)
    scanf("%d" &a[i]);
  for(int i = 0; i < 9; i++){
    for(int j = i + 1; i < 10; i++){
      if(a[i] > a[j])
        swap(a[i], a[j]);
    }
  }
  for(int i = 0; i < 3; i++){
    printf("%d\n", a[i]);
  }
  return 0;
}

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

using namespace std;

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

C++: #include<stdio.h>
#include<string.h>
#include<stdlib.h>

int main()
{
	int i=0;
	int a;
	int height[10]={0};
	int first,second,third;
	
	for(i=0;i<=9;i++)
	{
	 scanf("%d",&a);
	 height[i]=a;
	}
	
    first=0;second=0;third=0;
	
	for(i=0;i<10;i++)
	{
		if (height[i]>first)
		 {third=second;second=first;first=height[i];continue;}
		if (height[i]<=first&&height[i]>=second)
		 {third=second;height[i]=second;continue;}
		if (height[i]<second&&height[i]>third)
		 {third=height[i];continue;}
	}
	
	printf("%d \n%d \n%d \n",first,second,third);
	exit(0);
}

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

int main(void)
{
	vector <int> a;
	int b;
	
	for (int i = 0; i < 10; i++){
		scanf("%d", &b);
		a.push_back(b);
	}
	sort(a.begin(), a.end());
	printf("%d\n%d\n%d\n", a[9], a[8], a[7]);
	
	return 0;
}

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

int main(){

	int h[9];
	int i,j;
	int temp;

	h[0]=1819;
	h[1]=2003;
	h[2]=876;
	h[3]=2840;
	h[4]=1723;
	h[5]=1673;
	h[6]=3776;
	h[7]=2848;
	h[8]=1592;
	h[9]=922;

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

			if(h[i]>h[j]){
			temp=h[i];
			h[i]=h[j];
			h[j]=temp;
		
			}
		}
	}
	
	cout << "最も高い山は :" << h[0] << endl;

	cout << "２番目に高い山は :" << h[1] << endl;

	cout << "３番目に高い山は :" << h[2] <<endl;


	return 0;


}

C++: //
//  main.cpp
//  sanpie
//
//  Created by h3037178 on 2017/07/28.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int i[10];
    for(int o=1;o<10;o++){
        cin>>i[o];
    }
    sort(i,i+10);
    cout<<i[9]<<endl<<i[8]<<endl<<i[7]<<endl;
}

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

int main(void) {
    vector<int> v;
    for (int i = 0; i < 10; i++) {
        int input;
        scanf("%d", &input);
        v.push_back(input);
    }
    sort(v.rbegin(), v.rend());
    for (int i = 0; i < 3; i++) {
        printf("%d\n", v[i]);
    }
}

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

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

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

int main() {
	priority_queue<int> Q;
	for(int i = 0; i < 10; i++) {
		int a;
		cin >> a;
		Q.push(a);
	}
	for(int i = 0; i < 3; i++) {
		cout << Q.top() << endl;
		Q.pop();
	}
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>
#include <list>
#include <cmath>
#include <map>
#include <utility>
#include <numeric>
#include <set>
#include <map>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define _USE_MATH_DEFINES

using namespace std;
using ll = long long;
using P = pair<int, int>;

const ll INF = 999999999;
const ll atcoder = 1000000007;
const int dx[4] = { 1 , 0 , -1 ,0 };
const int dy[4] = { 0 , 1 , 0 , -1 };

int main() {

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

	sort(h, h + 10);

	cout << h[9] << endl;
	cout << h[8] << endl;
	cout << h[7] << endl;

	return 0;

}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>

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

int main() {
	char buf[256];
	int top3[3];
	int n, i, j, trade;
	
	// initialize
	memset(top3, 0, sizeof(int) * 3);
	
	for (j = 0; j < 10; j++) {
		fgets(buf, sizeof(buf), stdin);
		n = atoi(buf);
		
		if (n <= top3[2]) { continue; }
		
		top3[2] = n;
		for (i = 1; 0 <= i; i--) {
			if (top3[i] < top3[i + 1]) {
				trade = top3[i];
				top3[i] = top3[i + 1];
				top3[i + 1] = trade;
			}
		}
	}
	
	print_top3(top3);
	
	return 0;
}