Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

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

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

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

int main(){

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

	for(int j=0;j<=9;j++){
		scanf("%d",&hill[j]);
	}

	int key;

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

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

	}

	printf("%d%d%d",hill[9],hill[8],hill[7]);

	return 0;

}

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

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

    sort(h.begin(),h.end(), greater<int>() );
    cout << h[0]<<endl;
    cout << h[1]<<endl;
    cout << h[2]<<endl;

    return 0;
}

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

#define BOGO 10

using namespace std;

int main()
{
	int arr[BOGO];
	bool found;
	int j;
	srand(static_cast<unsigned int>(time(NULL)));
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		
		/**
		for(int j = 0; j < BOGO; j++){
			cout << arr[j] << flush;
		}
		cout << endl;
		/**/
		
		found = true;
		for(j = 0; j < BOGO-1; j++){
			if(arr[j] > arr[j+1]){
				found = false;
				break;
			}
		}
		
		if(found){
			break;
		}
		random_shuffle(arr, arr+BOGO);
	}
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

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

	sort(v.begin(), v.end());
	reverse(v.begin(), v.end());
	for (int i = 0; i < 3; i++) {
		cout << v.at(i) << endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,j) FOR(i,0,j)
#define mp std::make_pair

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int,int> P;
typedef std::pair<int,P> State;

const int INF = 1001001001;

// S N E W(南北東西)
const int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1}, dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};

const int MAX_N = 5;

class IntervalHeap{
public:
    IntervalHeap()
        :size(1), next(0){
        for(int i=1;i<=MAX_N;i++){
            data[i][0] = 0;
            data[i][1] = 0;
        }
    }
    IntervalHeap(int n){
        for(int i=1;i<=(n+1)/2;i++){
            data[i][0] = 0;
            data[i][1] = 0;
        }
    }
    void insert(int v){
        if(next == 1){
            data[size][1] = v;
            if(data[size][0] > data[size][1]){
                std::swap(data[size][0], data[size][1]);
                heapUp(size, 0);
            }else{
                heapUp(size, 1);
            }
        }else{
            data[size][0] = v;
            data[size][1] = v;
            if(data[size][0] < data[size/2][0]){
                heapUp(size, 0);
                data[size][1] = data[size][0];
            }
            if(data[size][1] > data[size/2][1]){
                heapUp(size, 1);
                data[size][0] = data[size][1];
            }
        }
        
        if(next == 1){++size;}
        next ^= 1;
    }
    void deleteMin(){
        if(isEmpty()){return;}
        next ^= 1;
        
        if(next == 1){
            --size;
        }else{
            data[size][1] = data[size][0];
        }
        data[1][0] = data[size][next];
        heapDown(1, 0);
    }
    void deleteMax(){
        if(isEmpty()){return;}
        if(size == 2 && next == 0){data[1][1] = data[1][0]; size = 1; next = 1; return;}
        next ^= 1;
        
        if(next == 1){
            --size;
        }else{
            data[size][1] = data[size][0];
        }
        data[1][1] = data[size][next];
        heapDown(1, 1);
    }
    int min(){
        if(isEmpty()){} // Error
        return data[1][0];
    }
    int max(){
        if(isEmpty()){} // Error
        return data[1][1];
    }
    bool isEmpty(){
        return size == 1 && next == 0;
    }
private:
    void heapUp(int index, int flag){
        if(index == 1){return;}
        
        if(flag ^ (data[index][flag] < data[index/2][flag])){
            std::swap(data[index][flag], data[index/2][flag]);
            heapUp(index/2, flag);
        }
    }
    void heapDown(int index, int flag){
        int child = index * 2;
        if(child >= size+next){return;}
        
        if(child+1 < size+next && flag ^ (data[child][flag] > data[child+1][flag])){++child;}
        if(flag ^ (data[child][flag] < data[index][flag])){
            std::swap(data[child][flag], data[index][flag]);
            if(data[child][0] > data[child][1]){std::swap(data[child][0], data[child][1]);}
            heapDown(child, flag);
        }
    }
    int data[MAX_N+1][2];
    int size, next;
};

IntervalHeap ih;

int main(){
    REP(i, 10){
        int n;
        std::cin >> n;
        ih.insert(n);
    }

    REP(i, 3){
        std::cout << ih.max() << std::endl;
        ih.deleteMax();
    }
}

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

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

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

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

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

int main(){
  int a[10];
  int f=0,s=0,t=0;
  cin>>a[0];
  f=a[0];
  for(int i=1;i<10;i++){
    cin>>a[i];
    if(a[i]>f){
      s=f;
      f=a[i];}
      else if(a[i]>s){
	t=s;
	s=a[i];}
	else if(a[i]>t){
	  t=a[i];}
  }
  cout<<f<<endl;
  cout<<s<<endl;
  cout<<t<<endl;
      
    
    
    

  return 0;
}

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

int main(){
	int m[10];
	
	for(int i = 0;i < 10;i++){
		cin >> m[i];
		
		while(!((m[i] >= 0)&&(m[i] <= 10000))){
			cout << "wrong value\n";
			cin >> m[i];
		}
	}
	sort(m, m+10,greater<int>());
	
	for(int i = 0;i < 3;i++){
		cout << m[i] << "\n";
	}
	
    return 0;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

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

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

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

	return 0;
}

C++: #include<iostream>

using namespace std;

//??\?????????
void swap(int *a, int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}

int main(){
	int str,mt[10];
	int i;
	
	for(i=0;i<10;i++){
		cin >> str;
		mt[i]=str;
	}
	
	// ????????????
	int num = 1;
	while(num<=3){
		str = mt[num-1];
		for(i=num;i<=10;i++){
			if(str<mt[i]){
				str = mt[i];
				swap(mt[num-1],mt[i]);
			}
		}
		cout << mt[num-1] << "\n";
		num++;
	}
	
	return 0;
}