Go: package main

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

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

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

int main()
{
    const int num_of_height = 10;
    const int num_of_top = 3;
    const int min = 0;
    const int max = 10000;
    
    int h;
    std::vector<int> height;
    height.reserve(num_of_height);
    
    //std::cout << num_of_height << "個の高さの入力" << std::endl;
    for(int i = 0; i < num_of_height; ++i){
        while(1){
            std::cin >> h;
            if(min <= h && h <= max)
                break;
            else
                std::cout << min << "<=h<=" << max << "に設定" << std::endl;
        }
        height.push_back(h);
    }
    
    sort(height.begin(), height.end(), std::greater<int>());
    
    //std::cout << "高い順から" <<  num_of_top << "個出力" << std::endl;
    for(int i = 0; i < num_of_top; ++i)
        std::cout << height.at(i) << std::endl;
        
    return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int i,j,wk;	
	int data[10];
	
	for(i=0;i<10;i++){
		scanf("%d",&data[i]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(data[i]<data[j]){
				wk=data[i];
				data[i]=data[j];
				data[j]=wk;
			}
		}
	}
	printf("%d\n",data[0]);
	printf("%d\n",data[1]);
	printf("%d\n",data[2]);

	return 0;
}

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

void printA(int A[], int N){
	printf("%d",A[0]);
	for(int i=1; i<N; ++i){
		printf(" %d",A[i]);
	}
	printf("\n");
}

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

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

using namespace std;

int main(void) {
	int array[10];
	for(int i = 0; i < 10; i++)
		scanf("%d", &array[i]);
	sort(array, array + 10, greater<int>());
	for(int i = 0; i < 3; i++)
		printf("%d\n", array[i]);
	return 0;
}

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

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

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

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

  return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
int main(){
    vector<int> v;
    int a;
    for(int i=0; i<10; i++){
        cin >> a;
        v.push_back(a);
    }
    sort(v.begin(), v.end());
    cout << v[9] << endl;
    cout << v[8] << endl;
    cout << v[7] << endl;
    
    return 0;
}

C++: #include <iostream>
int main()
{
using namespace std;
int box[10];
for (int i=0;i<10;i++)
        cin >>box[i];
for (int i=1;i<10;i++)
{
        int key = box[i];
        int j = i-1;
        while (j>=0 && box[j] > key)
        {
                box[j+1]=box[j];
                j--;
        }
        box[j+1] = key;
}
cout << box[9] <<endl;
cout << box[8] <<endl;
cout << box[7] <<endl;
}

C++: #include<iostream>
using namespace std;
int main() {
	int mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}

	int taller[3];
	int a, b, c;

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a <= b) {
			if (a <= c) {
				if (a < mountain[y]) {
					a = mountain[y];
				}
			}
			else {
				if (c < mountain[y]) {
					c = mountain[y];
				}
			}
		}
		else if (b <= c)
		{
			if (b < mountain[y]) {
				b = mountain[y];
			}
		}
	}

	//biggest->taller[0],bigger->taller[1],taller[2]
	{
		if (a >= b&&a >= c)
		{
			taller[0] = a;
			if (b >= c)
			{
				taller[1] = b;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = b;
			}
		}
		if (b >= a&&b >= c)
		{
			taller[0] = b;
			if (a >= c)
			{
				taller[1] = a;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = a;
			}
		}
		if (c >= b&&c >= a)
		{
			taller[0] = c;
			if (b >= a)
			{
				taller[1] = b;
				taller[2] = a;
			}
			else {
				taller[1] = a;
				taller[2] = b;
			}
		}
	}

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

	char a____;
	cin >> a____;

	return 0;
}

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

int main(){
    vector<int> v(10);
    for(int i = 0; i< 10; i++){
        cin >> v[i];
    }
   sort(v.begin(),v.end());
   cout << v[0] << endl;
   cout << v[1] << endl;
   cout << v[2] << endl;
}

C++: #include<iostream>
using namespace std;
int main(){
	
	int a[10],max,max2,max3;
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	max=a[0];
	max2=a[0];
	max3=a[0];
	for(int b=1;b<10;b++){
		if(max<a[b]){
			max=a[b];
		}
	}
	for(int c=1;c<10;c++){
		if(a[c]!=max){
			if(a[c]>max2){
				max2=a[c];
			}
		}
	}
	for(int d=1;d<10;d++){
		if(a[d]!=max&&a[d]!=max2){
			if(max3<a[d]){
				max3=a[d];
			}
		}
	}
	cout<<max<<endl;
	cout<<max2<<endl;
	cout<<max3<<endl;
	
	return 0;
}

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>
using namespace std;

int main() {
	int buf[3]={-1}, h, count=0;
	
	while(scanf("%d", &h) != EOF) {
		count++;
		if(h >= min(buf[0], min(buf[1], buf[2]))) {
			sort(buf, buf+3);
			reverse(buf, buf+3);
			buf[2] = h;
		}
	}
	sort(buf, buf+3);
	reverse(buf, buf+3);
	if(count <3) {
		for(int i=1; i<=count; i++) {
			printf("%d\n", buf[i-1]);
		}
	}
	else {
		for(int i=1; i<=3; i++)
			printf("%d\n", buf[i-1]);
	}
	return 0;
}

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

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

#define M 10
#define REQUIRED 3

bool ascending (int i, int j) { return i > j; }

int main() {
  vector<int> heights(M, 0);
  for (int i = 0; i < M; i++) {
    cin >> heights[i];
  }

  std::sort(heights.begin(), heights.end(), ascending);
  for (int i = 0; i < REQUIRED; i++) {
    cout << heights[i] << endl;
  }
  
  return 0;
}

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

using namespace std;

int main()
{
	vector<int> data;
	int temp;

	for (int ix = 0; ix != 10; ++ix){
		cin >> temp;
		data.push_back(temp);
	}

	sort(data.begin(), data.end());
	for (int ix = 0; ix != 3; ++ix)
		cout << data[ix] << endl;

	return 0;
}

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

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

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

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

int main(){
  vector<int> v;
  for(int i=0;i<10;i++){
    int m;
    cin >> m;
    v.push_back(m);
  }


  sort(v.begin(), v.end(), greater<int>());

  cout << v.at(0) << endl;
  cout << v.at(1) << endl;
  cout << v.at(2) << endl;

  return 0;
}

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