Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

C++: #include <stdio.h>

int main(void){

    int mountain[10] = {0};
    int i=0;
    int j=0;
    int k=0;
    int count=0;
    int m1=0;
    int m2=0;
    int m3=0;
    
    for(i=0; i<10; i++){
        scanf("%d", &j);
        mountain[i] = j;
    }
    
    for(i=0; i<10; i++){
        j=mountain[i];
        while(k<10){
            if(j > mountain[k]){
                count++;
            }
            k++;
        }
        if(count==9){
            m1=j;
        }
        else if(count==8){
            m2=j;
        }
        else if(count==7){
            m3=j;
        }
        k=0;
        count=0;
        j=0;
    }
    printf("%d\n", m1);
    printf("%d\n", m2);
    printf("%d\n", m3);
    
    return 0;
}

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

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

		cin >> h[i];
	}
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;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);
     }
     for(int i=9;i>6;i--){
           cout<<a[i]<< endl;
     }
	
}

C++: #include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(a) (a).begin(),(a).end()

int main() {
    vector<int> a(10);
    REP(i, 10) cin >> a[i];
    sort(ALL(a), greater<int>());
    REP(i, 3) cout << a[i]<< endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int a,mountain[10],j,k;
	for(int i=0;i<10;i++){
		cin>>mountain[i];
	}
	for(j=0;j<10;j++){
		for(k=0;k<10-j;k++){
			if(mountain[k]<mountain[k+1]){
				a=mountain[k];
				mountain[k]=mountain[k+1];
				mountain[k+1]=a;
			}
		}
	}
	cout<<mountain[0]<<"\n"<<mountain[1]<<"\n"<<mountain[2]<<"\n";
	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 + 3, hills+10, greater<int>() );
    
    for(int i=0;i<3;i++)　cout << hills[i] <<endl;
    
	return 0;
}

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

int main() {
	int height;
	std::vector<int> heights;

	while (std::cin >> height) {
		heights.push_back(height);
	}
	std::sort(heights.begin(), heights.end());
	std::reverse(heights.begin(), heights.end());
	for (int i = 0; i < 3; ++i) {
		std::cout << heights.at(i) << std::endl;
	}

	return 0;
}

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

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

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

int main(void) {
    std::priority_queue<u_int> heights;
    
    for (u_int h, i = 0; i < 10; ++i) {
        std::cin >> h;
        heights.push(h);
    }
	
    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights.top() << std::endl;
        heights.pop();
    }
    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\n%d\n%d\n",hill[9],hill[8],hill[7]);

	return 0;

}

C++: #include <iostream>

using namespace std;

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

    for (int i = 0; i < 10; i++) {
        for (int j = 0; j < i; j++) {
            if (height[j] < height[i]) {
                int temp = height[j];
                height[j] = height[i];
                height[i] = temp;
            }
        }
    }

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

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

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

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int sum[10];
  int  i;
  for(i = 1; i <= 10 ;i++){
  cin >> sum[i];
  }
  sort(sum,sum+10);
  for(i = 9 ; i > 6;i--){
    cout << sum[i] << endl;
  }
    return 0;
  }

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

int main()
{
    std::set< int, std::greater<int> > s;
    for (int i = 0; i < 10; ++i) {
        int h;
        std::cin >> h;
        s.insert(h);
    }
    std::set< int, std::greater<int> >::iterator it = s.begin();
    for (int i = 0; i < 3; ++i)
        std::cout << *it++ << std::endl;
}

C++: #include<stdio.h>
int main()
{
long long a[11],i,temp,j,k,n=10;
for(i=0;i<10;i++)
{
scanf("%lld",&a[i]);
}
for(j=0;j<n-1;j++)
	{
	for(k=0;k<n-1;k++)
	{
	if(a[k+1]<a[k])
	{
	temp=a[k+1];
	a[k+1]=a[k];
	a[k]=temp;
	}
	}
}
for(i=9;i>6;i--)
{
printf("%lld\n",a[i]);
}
return 0;
}

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

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

 for(int i=0; i<3; i++){
  int n = h[0];
  int m = 0;
  for(int j=1; j<10; j++)
   if(n < h[j]){
    n = h[j];
    m = j;
   }
  cout << n << '\n';
  h[m] = -1;
 }

 return 0;
}

C++: #include <stdio.h>

int main(void){
  int height[10];
  int i, j;
  int tmp;

  for(i=0;i<10;i++){
    scanf("%d", &height[i]);
  }
  
  for(i=0;i<9;i++){
    for(j=i+1;j<9;j++){
      if(height[i] <= height[j]){
	tmp = height[i];
	height[i] = height[j];
	height[j] = tmp;
      }
    }
  }

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

  return 0;
}