Go: package main

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

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; 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>
using namespace std;
int main(void){
int i, j, n[10], max, temp;

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

for(i=0; i < 10; i++){
max = i;
for(j = i + 1; j < 10; j++){
if(n[max] <n[j]) max = j;
}
temp = n[max];
n[max] = n[i];
n[i] = temp;

while(i==0){
cout<<temp<<endl;
break;
}
while(i==1){
cout<<temp<<endl;
break;
}
while(i==2){
cout<<temp<<endl;
break;
}

}
}

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

int main() {
	int a[10];

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

	for (int i = 1; i < 10; i++) {
		int key = a[i];
		int j = i-1;
		while (j >= 0 && a[j] < key) {
			a[j+1] = a[j];
			j--;
		}
		a[j+1] = key;
	}

	for (int i = 0; i < 3; i++) {
		cout << a[i] << endl;
	}

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a, b, max = 0, max2 = 0, max3 = 0;
	for (a = 1; a <= 10; a++) {
		scanf("%d", &b);
		if (b > max) {
			max = b;
		}
		else if (b > max2) {
			max2 = b;
		}
		else if (b > max3) {
			max3 = b;
		}
	}
		printf("%d\n %d\n %d\n", max, max2, max3);
		return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a,b,c=0,d;
	int yama[10];
	int hyama[3];
	for(a=0;a<10;a++){
		cin >> yama[a];
	}
	for(a=0;;a++){
		if(a == 9){
			a = 0;
			c = 0;
		}
		if(yama[a] < yama[a+1]){
			b = yama[a];
			yama[a] = yama[a+1];
			yama[a+1] = b;
		} 
		else {
			c++;
		}
		if(c == 9) {
			break;
		}
	}
	for(a=0;a<3;a++) {
		cout << yama[a] << endl;
	}
	return 0;
}

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

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

    auto out = mountains.end();
    for(int i = 0; i < 3; i++) {
        cout << *--out << endl;
    }

    return 0;
}

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

using namespace std;

int main(){
	typedef vector<int> vint;
	typedef vector<int>::iterator vintit;

	const int SUM_OF_DATA = 10;
	const int TOP = 3;
	vint hList(SUM_OF_DATA);
	vint result(TOP);
	
	for (vintit it = hList.begin(), end = hList.end(); it != end; ++it) cin >> *it;

	partial_sort_copy(hList.begin(), hList.end(), result.begin(), result.end(), greater<int>());
	for (vintit it = result.begin(), end = result.end(); it != end; ++it) cout << *it << endl;
	
	return 0;
}

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

using namespace std;

int main() {
	int m[10];

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

	stable_sort(m, m + 10);
	
	for(int i=9;i>6;i--)printf("%d\n", m[9]);

	return 0;
}

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

int main()
{
  int high;
  int temp1,temp2;
  int first=0,second=0,third=0;
  
  for(int i=0;i<10;i++){
    cout<<"山の高さ"<<i+1<<":";
    cin>>high;
    if(high>first){
      temp1=first;
      first=high;
      temp2=second;
      second=temp1;
      third=temp2;
    } else if (first>=high && high>second){
      temp2=second;
      second=high;
      third=temp2;
    } else if (second>=high && high>third){
      third=high;
    }
  }

  cout<<"1番目に高い山の高さ:"<<first<<endl;
  cout<<"2番目に高い山の高さ:"<<second<<endl;
  cout<<"3番目に高い山の高さ:"<<third<<endl;
  
  return 0;
}

C++: #include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
 /*temp*/

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

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

#define SIZE 10
#define MAX 10000
#define TOP 3

using namespace std;

int main() {
 int i = 0;
 int buf;
 int height[SIZE];
 
 while(i < SIZE) {
  scanf("%d", &buf);
  
  height[i] = buf;

  ++i;
 }

 sort(height, height + SIZE, greater<int>());

 for(i = 0; i < TOP; ++i) {
  printf("%d/n",height[i]);
 }

 return 0;
}

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

using namespace std;

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

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

	for (int i = 1; i <= 3; i++) {
		cout << v.at(v.size() - i) << endl;
	}

	return 0;
}

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

int main(){
int a[10];
int b;
int c;
int d;
int e;
c=0;
d=0;
e=0;
b=0;
while(b<10){
cin >> a[b];
if(c<a[b]){e=d;
           d=c;
           c=a[b];}
else if(d<a[b]){e=d;
                d=a[b];}
else if(e<a[b]){e=a[b];}
b=b+1;
}          
cout << c <<endl;
cout << d <<endl;
cout << e;
    return 0;
}

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

int main(){

	int i = 0,j=0,k=0;
	int mountain[11] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922};

	for(i=0;i<10;i++){
		for(j=i+1;j<10;j++){
	if(mountain[i] < mountain[j]){
		k = mountain[j];
		mountain[j] = mountain[i] ;
		mountain[i] = k ;
	}
	}
	}

	for(i=0;i<3;i++){
		cout << mountain[i] <<"\n" ;
	}
    return 0;
}

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

int main(){
    
    int i;
    int max1, max2, max3;
    std::array <int, 10> hill;
    
    max2 = 0;
    max3 = 0;

    for (i = 0; i < 10; ++i) {
        std::cin >> hill.at(i);
        
        if (i == 0) max1 = hill.at(0);
        
        if (max1 < hill.at(i)) { 
            max2 = max1;                    
            max1 = hill.at(i);
        } else if (max2 < hill.at(i)) {
            max3 = max2;
            max2 = hill.at(i);
        } else if (max3 < hill.at(i)) max3 = hill.at(i);
        else {}
    }
    
    std::cout << max1 << std::endl << max2 << std::endl << max3 << std::endl;
    
    return 0;
}

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

#define N 10
int main(){
	int height[N];
	
	for(int i=0;i<N;i++){
		cin >> height[i];
	}
	
	sort(height,height+N);
	
	for(int j=N-1;j>N-4;j--){
		cout << height[j] << endl;
	}
	
	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <algorithm>
#include <functional>

using namespace std;

#define rep(i,n) for((i)=0;(i)<(int)(n);(i)++)
#define each(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)

bool rev(int a, int b){ return a > b; }

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

  rep(i,10) cin >> in[i];
  sort(in, in+10, rev);
  rep(i,3) cout << in[i] << endl;

  return 0;
}

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

int main(){
	std::vector<int> o;
	for(int i=1;i<=10;i++){
		int in=0;
		std::cin>>in;
		o.push_back(in);
	}
	std::sort(o.begin(),o.end());
	std::cout<<o[9]<<std::endl<<o[8]<<std::endl<<o[7]<<std::endl;
}

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

int main(){
  int t[10];
  for(int i = 0; i < 10; i++){
    cin >> t[i];
  }
  sort(t, t + 10, greater<int>());

  for(int i = 0; i < 3; i++){
    cout << t[i] << endl;
  }
}

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

int main() {
	int a,one=0,two=0,three=0;
	for (int i=0;i<10;i++){
		cin>>a;
		if (a>three) three=a;
		if (three>two) swap(two,three);
		if (two>one) swap(one,two);
	}
		cout<<one<<endl<<two<<endl<<three;
	return 0;
}