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>

using namespace std;

#define ARRAY_SIZE 10

void sort(int array[],int size){
    int tmp;
    for(int i=0;i<size;i++){
        for(int j=size-1;j>i;j--){
            if(array[j]>array[j-1]){
                tmp=array[j];
                array[j]=array[j-1];
                array[j-1]=tmp;
            }
        }
    }
}

int main() {
    int array[ARRAY_SIZE]={0};
    
    for(int i=0;i<10;i++) cin>>array[i];
    sort(array,(sizeof(array)/sizeof(array[0])));
    for(int i=0;i<3;i++){
        cout << array[i] << endl;
    }
    return 0;
}

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

int main()
{
  int first = 0, second = 0, third = 0;
  for (int i = 0; i < 10; i++) {
    int n;
    cin >> n;
    if (n > first) {
      third = second;
      second = first;
      first = n;
    } 
    else if(n > second) {
      third = second;
      second = n;
    }
    else if(n > third) {
      third = n;
    }
  }
  cout << first << " " << second << " " << third << endl;
  return 0;
}

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


int main()
{
    int arr[10];

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

    sort(arr , arr+10);

    cout<<arr[9]<<endl;

    cout<<arr[8]<<endl;

    cout<<arr[7];

    return 0;
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <random>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef long long LL;
typedef  vector<int> VI;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	VI hill;
	REP(i, 10)
	{
		int temp;
		cin >> temp;
		hill.push_back(temp);
	}
	SORT(hill);
	COUT(hill[9]);
	COUT(hill[8]);
	COUT(hill[7]);
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

C++: Z:\H28\paso2016\toi02

C++: 
/* vo01.cpp */
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;

int main()
{
	int hills[10];

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

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

	for (int i = 0; i < 3; ++i)
		cout << hills[i] << '\n';

	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <iomanip>
#include <queue>
using namespace std;

 
int main(){

	priority_queue<int> q;
	int tmp;

	for(int i = 0; i < 10; i++){
		cin >> tmp;
		q.push(tmp);
	}

	for(int i = 0; i < 3; i++){
		cout << q.top() << endl;
		q.pop();
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;



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

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

int main() {
  std::vector<int> hills;
  int hight;
  for (int i = 0; i < 10; ++i) {
    std::cin >> hight;
    hills.push_back(hight);
  }
  std::sort(hills.begin(), hills.end(), std::greater<int>());
  for (int i = 0; i < 3; ++i) {
    std::cout << hills[i] << std::endl;
  }

  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);
	for (int i=0;i<3;i++){
		cout<<m[9-i]<<endl;
	}
	return 0;
}

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

using namespace std;

int arr[12];

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

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

using namespace std;

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

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int mountain[11] ;
	for( int i=1 ; i<=10 ; i++ ){
		cin >> mountain[i] ;
	}
	for( int i=1 ; i<=10 ; i++ ){
		for( int k=1 ; k<=10 ; k++ ){
			if( mountain[i] > mountain[k] )
				swap( mountain[i] , mountain[k] );
		}
	}
	cout << mountain[1] << endl << mountain[2] << endl << mountain[3] << endl;
}

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

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

C++: #include<iostream>
using namespace std;
void q_sort(int numbers[], int left, int right)
{
    int pivot, l_hold, r_hold;
    l_hold = left;
    r_hold = right;
    pivot = numbers[left];
    while (left < right)
    {
        while ((numbers[right] >= pivot) && (left < right))
            right--;
        if (left != right)
        {
            numbers[left] = numbers[right];
            left++;
        }
        while ((numbers[left] <= pivot) && (left < right))
            left++;
        if (left != right)
        {
            numbers[right] = numbers[left];
            right--;
        }
    }
    numbers[left] = pivot;
    pivot = left;
    left = l_hold;
    right = r_hold;
    if (left < pivot)
        q_sort(numbers, left, pivot-1);
    if (right > pivot)
        q_sort(numbers, pivot+1, right);
}
int main()
{
	int mountain[10];	
	for(int i=0;i<10;i++)
		cin>>mountain[i];
	q_sort(mountain,0,9);
	for(int i=9;i>6;i--)
		cout<<mountain[i]<<endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  priority_queue<int> que;
  int a;
  for(int i = 0;i < 10;i++) {
    cin >> a;
    que.push(a);
  }
  for(int i = 0;i < 3;i++){
    printf("%d\n", que.top());
    que.pop();
  }

  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
	int h[10];
	for(int i=0;i<10;i++){
	cin>>h[i];
	}
	for(int i=0;i<10;i++){
		for(int j=i+1;j<10;j++){
			if(h[i]>h[j]){
			swap(h[i],h[j]);
			}
		}
	}
	cout<<h[9]<<endl<<h[8]<<endl<<h[7]<<endl;
	return 0;
}