Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

	for i := 0; i < 3; i++ {
		fmt.Println(topHeights[i])
	}
}

C++: #include<stdio.h>
int main(){
	int l[10],r[10]={-1};
	int i,j,k,c[10]={11},n=0;
	for(i=0;i<10;i++){
		scanf("%d",&l[i]);
	}
	for(j=0;j<10;j++){
		for(i=0;i<10;i++){
			for(k=0;k<10;k++){
				if(c[k]==i){
					n=1;
				}
			}
			if(!(n==1)){
				if(l[i]>=r[j]){
					r[j]=l[i];
					c[j]=i;
				}
			}
			n=0;
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",r[i]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    int array[10];
    int i, j, tmp;
     
    for(i=0; i<10; i++){
        cin >> array[i];
    }
     
    for(i=0; i<9; i++){
        for(j=i+1; j<10; j++){
            if(array[i] < array[j]){
                tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
            }
        }
    }
     
    for(i=0; i<3; i++){
        cout << array[i] << "\n";
    }
     
    return 0;
}

C++: #include <iostream>

using namespace std;
#define total 5


int main (void){

	int height[total];
	for(int i=0;i<total;i++){
		cin>>height[i];
		while(height[i]<0||height[i]>10000){
			cin>>height[i];
		}
	}
	int temp=0;
	for(int i=0;i<total;i++){
		for(int j=i+1;j<total;j++){
			if(height[i]<height[j]){
				temp=height[i];
				height[i]=height[j];
				height[j]=temp;
			}
		}
	}
	cout<<height[0]<<endl<<
		height[1]<<endl<<
		height[2]<<endl;
}

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

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

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

    return 0;
}

C++: #include <iostream>
#include <queue>
using namespace std;
typedef long long ll;

int main() {
    priority_queue<int> pq;
    
    for(int i=0;i<10;i++){
        int x;cin>>x;
        pq.push(x);
    }
    
    for(int i=0;i<3;i++){
        cout<<pq.top()<<endl;pq.pop();
    }
}

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

using namespace std;

int MAX(int a,int b){
	if(a>b) return a;
	else return b;
}

int MIN(int a,int b){
	if(a>b) return b;
	if(a<b) return a;
	else return b;
}


int main(){
	int moun[11];
	for(int i=0;i<10;i++)
		cin>>moun[i];
	int no1,no2,no3,n=0,p=0,w=0;
	
		no1=MAX(moun[n],moun[n+1]);
		for(n=2;n<10;n++)
		no1=MAX(no1,moun[n]);

		for(int o=0;o<10;o++){
			if(no1==moun[o])
				moun[o]=0;
		}

	    no2=MAX(moun[p],moun[p+1]);
		for(p=2;p<10;p++)
		no2=MAX(no2,moun[p]);

		for(int q=0;q<10;q++){
			if(no2==moun[q])
				moun[q]=0;
		}

		no3=MAX(moun[w],moun[w+1]);
		for(w=2;w<10;w++)
		no3=MAX(no3,moun[w]);

		for(int l=0;l<10;l++){
			if(no3==moun[l])
				moun[l]=0;
		}
		cout<<no1<<" "<<no2<<" "<<no3<<"\n";

	return 0;
}

C++: using namespace std;

int main(){
	vector <int> v;
	for(int i = 0;i < 10;i++){
		int n;
		cin >> n;
		v.push_back(n);
	}
	sort(v.begin(), v.end());
	//cout << endl;
	for(int i = 9; i >=7;i--){
		cout << v[i] << endl;
	}
	return 0;
}

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

int main() {
	std::vector<int> v;
	std::copy( std::istream_iterator<int>(std::cin), std::istream_iterator<int>(), std::back_inserter(v) );
	std::sort( v.begin(), v.end(), std::greater<int>() );
	std::copy( v.begin(), v.begin()+3, std::ostream_iterator<int>(std::cout, "\n" ));
}

C++: #include <stdio.h>

int main(void){

int i,j,n,max[3],dummy;

for(i=0;i<3;i++){
max[i]=0;
}

for(i=0;i<10;i++){

  scanf("%d",&n);

for(j=0;j<3;j++){
 if(n>max[j]){
   dummy=max[j];
   max[j]=n;
   n=dummy;
  }
 }
}

for(i=0;i<3;i++){
printf("%d\n",max[i]);
}

}

C++: #include <iostream>
using namespace std;
int height[10];
void sort(int A[]);
void swap(int &a, int &b);
int main()
{
	int n = 10;
	for (int i = 0; i < 10; i++)
		cin >> height[i];
	sort(height);
	return 0;
}
void sort(int A[])
{
	int i, j, min;
	for (i = 0; i < 10; i++)
		min = i;
	for (j = i; j < 10; j++)
	{
		if(A[j] > A[min])
		{
			swap(A[j], A[min]);
			min = j;
		}
	}
	for (i = 0; i < 3; i++)
	{
		printf("%d\n", A[i]);
	}
}
void swap(int &a, int &b)
{
	int t ;
	t = a;
	a = b;
	b = t;
}

C++: #include <stdio.h>

using namespace std;


int main(){
	int count[10001],tmp,num=3;
	for(int i=0;i<10001;i++)count[i]=0;

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

	for(int i=10000;i>=0&&num>0;i--){
		if(count[i]>0){
			for(int k=0;k<count[i]&&num>0;k++){
				printf("%d\n",i);
				num--;
			}
		}
	}

    return 0;
}

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

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

	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main ()
{
   /*int a,b,c,d;
   while(scanf("%d%d",&a,&b)==2)
   {
       c=10-a;
       d=abs(b-10);
        printf("%d %d\n",c,d);
   }*/
   int a[10];
   for(int i=0;i<10;i++)
   {
       scanf("%d",&a[i]);
   }
   sort(a,a+10);
   for(int i=9;i>=7;i--)
   {
       printf("%d\n",a[i]);
   }
   return 0;

}

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

using namespace std;

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

void output(vector<int> hills){
	for (int i = 0; i < 3; i++) cout << hills[i] << endl;
}

int main(){
	vector<int> hills;
	
	hills = input();
	sort(hills.begin(), hills.end(), greater<int>());
	output(hills);
	
	return 0;
}

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

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

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

int main() {
    array<int, 10> ar;
    for (auto& e : ar) {
        cin >> e;
    }
    sort(ar.begin(), ar.end(), greater<int>());
    for (int i = 0; i < 3; i++) {
        cout << ar[i] << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
 int h[10], i;
 for(i = 0;i < 10;i++){
  cin >> h[i];
 }
 sort(h,h+10);

for(i = 9;i > 6;i--){
  cout << h[i] << endl;
}

 return 0; 
}

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

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

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

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

int main(){
int heights[10];


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

	sort(heights , heights + 10);

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

return 0;
}

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

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