Go: package main

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

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func toInt(str string) int {
	n, _ := strconv.Atoi(str)
	return n
}

func main() {
	lst := make([]int, 0)
	for i := 0; i < 10; i++ {
		lst = append(lst, toInt(readLine()))
	}
	sort.Ints(lst)
	for i := 9; i > 6; i-- {
		fmt.Println(lst[i])
	}
}

C++: #include <iostream>                                             
#include <algorithm>                                            
#define N 10                                                    
#define Top 3                                                   
using namespace std;                                            
                                                                
int main() {                                                    
  int data[N];                                                  
  for (int i=0; i<N; i++) {                                     
    cin >> data[i];                                             
  }                                                             
  sort(data,data+N);                                            
  reverse(data,data+N);                                         
  for (int i=0; i<Top; i++) {                                   
    cout << data[i] << endl;                                    
  }                                                             
  return 0;                                                     
}

C++: #include<stdio.h>

int main(void){
	int i,j,k,l,x[10],highest,higher,high;
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	highest=0;
	higher=0;
	high=0;
	for(j=0;j<10;j++){
		if(x[j] > highest){
		highest=x[j];
	}
	}
	for(k=0;k<10;k++){
		if(x[k] > higher && highest > x[k]){
		higher=x[k];
	}
	}
	for(l=0;l<10;l++){
		if(x[l] > high && highest > x[l] && higher > x[l]){
		high=x[l];
	}
	}
	printf("%d\n%d\n%d\n",highest,higher,high);
	
return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional> 
&#160;
using namespace std;
&#160;&#160;&#160;
int main(){
&#160;&#160;&#160;
&#160;int i, height[10];
&#160;for(i=0;i<10;i++){
&#160;&#160;scanf("%d", &height[i]);
&#160;}
&#160;sort(height, height+10, greater<int>());
&#160;&#160;&#160;
&#160;for(i=0;i<3;i++){
&#160;&#160;printf("%d\n", height[i]);
&#160;}
&#160;&#160;&#160;
&#160;return 0;
}

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

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

C++: 
int main(){
	int hight[NUM];	// ??\????????????
	int top[TOP];

	// ?????????????????????
	for(int i=0; i < NUM ; ){
		cin >> hight[i];
		// ?????¶ : 0 <= ?±±????????? <= 10000
		if(hight[i] < 0  ||  hight[i] > 10000){
			continue;
        }
        i++;
	}
    
	// ?????????????????????TOP???????????????
	top[0] = 0;
	for(int i=0; i < NUM ; i++){
		for(int j=0;j<TOP ; j++){
			// ???????????????????????????????????°???hight[i]???top[j]?????????????????\?????????
			if(hight[i] > top[j]){
				for(int k=TOP-1 ; k > j ; k--){
					top[k] = top[k-1];  // <- ????????§?????°?????????
				}
				top[j] = hight[i];
                break;
			}
		}
	}

	// ?????????TOP???????????????
	for(int i=0; i < TOP ; i++ ){
		cout << top[i] << '\n';
	}

	return 0;
}

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

using namespace std;

int main ()
{
    int a[10],i;

    for(i=0;i<10;i++)
    {
        scanf("%d",&a[i]);
    }

    int n= sizeof(a)/sizeof(a[0]);

    sort(a,a+n);

    printf("%d\n",a[9]);
    printf("%d\n",a[8]);
    printf("%d",a[7]);

    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(){

	int hill[10];

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

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

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

	int a;
	std::cin >> a;
return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using std::sort;
main(){
int x[10];
for(i=0;i<10;i++)
scanf("%d",&x[i]);
sort(x,x+10);
printf("%d\n%d\n%d",x[9],x[8],x[7]);
}

C++: #include<iostream> 
using namespace std;
void bubblesort(int A[]){
	for(int i=0;i<10;i++){
		for(int j=10-1;j>i;j--){
			if(A[j]>A[j-1]){
			int t=	A[j-1];
			A[j-1]=A[j];
			A[j]=t;
			}
		}
	}	
}
int main(){
	int A[10];
	for(int i=0;i<10;i++){
		cin>>A[i];
	}
	for(int i=0;i<3;i++)
	{
		bubblesort(A);
		if(i>0)cout<<endl;
		cout<<A[i];
	 } 
    return  0;
}

C++: #include <iostream>

using namespace std;

void reverse(int *array, int length) {
	int i;
	int j;
	for(i=0;i<length-1;i++){
		for(j=i+1;j<length;j++){
			if(array[i]<array[j]){
				int temp=array[i];
				array[i]=array[j];
				array[j]=temp;
			}
		}
	}
}

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

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

using namespace std;

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

    sort(v.begin(),v.end());

    cout << v[0] << endl << v[1] << endl << v[2] << endl;
}
    return 0;

}

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

using namespace std;

int main(){
    vector<int> m(10);

    for(int i=0; i<10; i++){
        cin >> m[i];
    }
    sort(m.begin(), m.end());

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

    return 0;
}

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

int a,b=0;
for(int j=0;j<3;j++){
for(i=0;i<10;i++){
if(b<n[i]){
b = n[i];
a = i;
}
}
cout << b;
n[a] = 0;
}

	return 0;
}

C++: #include <stdio.h>
#include <limits.h>

int main(void)
{
    int a, max1, max2, max3, temp;

    max1 = max2 = max3 = INT_MIN;
    while(~scanf("%d", &a)) {
        if(a > max3) {
            max3 = a;

            /* 排序 */
            if(max3 > max1) {
                temp = max3;
                max3 = max2;
                max2= max1;
                max1 = temp;
            } else if(max3 > max2) {
                temp = max3;
                max3 = max2;
                max2 = temp;
            }
        }
    }

    printf("%d\n%d\n%d\n", max1, max2, max3);

    return 0;
}

C++: #include <iostream>

#include <vector>

#include <algorithm>

using namespace std;



int main() {

    vector<int> heights;

    int height;

    while (cin >> height) {

        heights.push_back(height);

    }

    sort(heights.rbegin(), heights.rend());

    for (int i = 0; i != 3; ++i) {

        cout << heights[i] << endl;

    }

    return 0;

}

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

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

  for(int i = 0 ; i < 10 ; i++)
    {
      for(int j = i + 1 ; j < 10 ; j++)
	{
	  if(height[i] < height[j])
	    {
	      int dumy = height[i];
	      height[i] = height[j];
	      height[j] = dumy;
	    }
	}
    }
  for(int i = 0 ; i < 3 ; i++)
    {
      cout << height[i] << endl;
    }
  return 0;
}

C++:  #include<iostream>
using namespace std;
int main()
{
	int a[10];
	int i=0,j=0;
	for(int i=0;i<10;i++)
	{
	    cin>>a[i];
	}
	for(i=0;i<3;i++)
	{
		for(j=0;j<9-i;j++)
		{
			if(a[j]>a[j+1])
			{
				int temp;
				temp=a[j+1];
				a[j+1]=a[j];
				a[j]=temp;
			}
		}
	 } 
	for(int i=9;i>6;i--)
	{
	    cout<<a[i]<<endl;
	}
	return 0;
}