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<cstdio>

using namespace std;

int main(){
  int i,j;
  int no1=0, no2=0, no3 = 0;
  int cur=0;
  for(i=0; i<10; i++){
    cin>>cur;
    if(cur>=no1){
      no3= no2;
      no2= no1;
      no1 = cur;
    }else if(cur>=no2){
      no3= no2;
      no2= cur;
    }else if(cur>=no3){
      no3= cur;
    }
  }
  cout << no1 << endl;
  cout << no2 << endl;
  cout << no3 << endl;

    return 0;
}

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

int main(){
	bool flag;
	int result[3],buf,temp[10];
	for(int i = 0; i < 10; i++){
		cin >> temp[i];
	}
	for(int l = 0; l < 3; l++){
		while(1){
			for(int j = l; j < 9; j++){
				if(temp[j] < temp[j+1]){
					buf = temp[j+1];
					temp[j+1] = temp[j];
					temp[j] = buf;
				}
			}
			flag = false;
			for(int k = l; k < 9; k++){
				cout << "reached!" << endl;
				if(temp[l] < temp[k]) flag = true;
			}
			if(flag != true){
				result[l] = temp[l];
				break;
			}
		}
	}
	cout << result[0] << endl;
	cout << result[1] << endl;
	cout << result[2] << endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
#include<deque>
#include<algorithm>
using namespace std;main(){int n,i;deque<int>h;while(cin>>n)h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;)cout<<h[i--]<<endl;}

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

int high[11] = {0};

int main()
{
    for(int i = 0; i < 10; i++)
    {
        scanf("%d",&high[i]);
    }
    for(int i = 0; i < 10; i++)
    {
        for(int j = i+1; j < 10; j++)
        {
            if(high[i] < high[j])swap(high[i],high[j]);
        }
    }
    for(int i = 0; i < 3; i++)
    {
        printf("%d\n",high[i]);
    }
    return 0;
}

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

C++: #include<stdio.h>

int main()
{
	int high[10];
	int i, j, temp;
	
	for(i = 0; i < 10; i++){
		scanf("%d",&high[i]);
	}
	
	for (i = 0; i < 9; i++){
		for (j = 9; j > i; j--){
			if (high[j - 1] < high[j]){
				temp = high[j];
				high[j] = high[j - 1];
				high[j - 1]= temp;
			}
		}
	
	}
	printf("%d\n%d\n%d",high[0], high[1], high[2]);
	
	return 0;
}

C++: #include <iostream>

using namespace std;

void buble_sort(int high[]){
    int i,j,v;

    for(i = 0;i < 9;i++){
        v = i;
        for(j = i;j <= 9;j++){
            if(high[v] < high[j]){
                v = j;
            }
        }
        int box = high[i];
        high[i] = high[v];
        high[v] = box;

    }
}

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

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

    buble_sort(high);

    cout << endl;

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

    return 0;
}

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

int i, m[10];

int main(void)
{
  for(i = 0; i < 10; i++)
    scanf("%d",&m[i]);

  sort(m,m+10);

  printf("%d\n%d\n%d\n",m[9],m[8],m[7]);
  return 0;
}

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

using namespace std;

int a[10];

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

C++: #include <iostream>

using namespace std;

int a[100000];
void sort( int * a, int i)
{
    int j, k;
    for( j = 0; j < i; j++ )
    {
        int min_index = j;
        for( k = j+1; k < i; k++ )
        {
            if( a[k] < a[min_index] )
                min_index = k;
        }
        if( j != min_index )
        {
            int tmp = a[j];
            a[j] = a[min_index];
            a[min_index] = tmp;
        }
    }
}
int main()
{
    int i = 0, j;
    while( cin >> a[i++] )
        ;
    sort( a, i );
    for( j = i - 3; j < i; j++ )
        cout << a[j] << endl;
    return 0;
}

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

using namespace std;

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

	partial_sort( hills, hills + 2, hills+9, greater<int>() );
    
    for(int i=0;i<3;i++){
        cout << hills[i] <<endl;
    }
    
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int high[10]={1819,2003,876,2840,1723,1673,3776,2848,1592,922};
	int x,max,time;


	for(time=1;time<=3;time++)
	{
		max=0;

		for(x=0;x<10;x++)
		{
			if(max<high[x])
			{
				max=high[x];
			}
		}
		for(x=0;x<10;x++)
		{
			if(max==high[x])
			{
				printf("%d\n",high[x]);
				high[x]=0;
			}
		}
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int fst = 0;
    int snd = 0;
    int thd = 0;
    int tmp=0;
    std::cin >> fst;
    for(int i=0;i<9;i++) {
        tmp = 0;
        std::cin >> tmp;
        if(fst < tmp) {
            thd = snd;
            snd = fst;
            fst = tmp;
        }else if(tmp > snd){
            thd = snd;
            snd = tmp;
        }else if(tmp > thd){
            thd = tmp;
        }else{}
    }
    printf("%d\n%d\n%d\n",fst,snd,thd);
}

C++: #include <stdio.h>

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

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

int main()
{
	int length;
	int a, b, c,tmp;
	a = b = c = 0;

	for (int i = 0; i < 10; i++)
	{
		scanf("%d",&length);
		if (length > a)
		{
			if (length > b)
			{
				a = b;
				if (length > c)
				{
					b = c;
					c = length;
				}
				else
				{
					b = length;
				}
			}
			else
			{
				a = length;
			}
		}
	}
	printf("%d\n", c);
	printf("%d\n", b);
	printf("%d\n", a);
	return 0;
}

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

int main(){

  int x,a=0,b=0,c=0,q=-1,p=-1;

  for(int i=0;i<10;i++){
   cin >> x;
  
   if(x>c){
    if(x>b){
      if(x>a){
	q=a;
	a=x;
      }
      if(q!=-1){
	p=b;
	b=q;
      }else{
	p=b;
	b=x;
      }
    }
    if(p!=-1){
      c=p;
    }else{
      c=x;
    }
   }
   p=-1;
   q=-1;
  }
      
  cout << a << endl;
  cout << b << endl;
  cout << c << endl;
	  
	  

 return 0;
}

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

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=9;j++){
		cin>>hill[j];
	}

	int key;
	int flag;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				flag=hill[i];hill[i]=hill[i+1];hill[i+1]=flag;
			}
		}

	}

	cout<<hill[9]<<"\n"<<hill[8]<<"\n"<<hill[7]<<endl;

	return 0;

}

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

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=9;j++){
		cin>>hill[j];
	}

	int key;
	int flag;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				flag=hill[i];hill[i]=hill[i+1];hill[i+1]=flag;
			}
		}

	}

	cout<<hill[9]<<"\n"<<hill[8]<<"\n"<<hill[7]<<endl;

	return 0;

}