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 <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];
	while(1);
	

	return 0;
}

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

int main(){
    int mountain[10];
    
    for(int i=0;i<10;i++)
        //scanf("%d",&mountain[i]);
	cin>>mountain[i];
    for(int i=1;i<9;i++){
        for(int j=0;j<=i;j++){
	    if(mountain[j]<mountain[j+1]){
                int temp;
		temp = mountain[j];
		mountain[j] = mountain[j+1];
		mountain[j+1] = mountain[j];
	    }
	}
    }

    //結果出力
    for(int i=0;i<3;i++)
         cout<<mountain[i]<<'\n';
    return 0;
}

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

using namespace std;

int main()
{
	vector<int> arr(10);
	
	for(int i = 0; i < 10; i++){
		cin >> arr[i];
	}
	
	sort(arr.begin(),arr.end());
	
	printf("%d\n%d\n%d\n",arr[10],arr[9],arr[8]);
	
	return 0;
}

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

int main(){
	int suchi,high=0,middle=0,low=0,i,flag=0,a,b,c;
	
	for(i=0;i<10;i++){
		cin>>suchi;
			
		if(flag==0){
			low=suchi;
			middle = suchi;
			high = suchi;
			flag++;
			}
			
		else{
			if(suchi>low&&suchi<middle)
				low = suchi;
			
			else if(suchi>middle&&suchi<high){
				low = middle;
				middle = suchi;
			}
			
			else if(suchi>high){
				low = middle;
				middle = high;
				high = suchi;
			}
				
			}
	}
	
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low;
	
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(void){
  int a[10],b[3]={0}, c, d, i;
  for(i = 0;i<10;i++){
    cin >> a[i];
  }
  i=0;
  for(c=0;c<3;c++){
  for(i=0;i<10;i++){
    if(a[i] > b[c]){
      b[c] = a[i];
      d=i;
    }
  }
  a[d] = 0;
  }
  i=0;
  for(i=0;i<3;i++) cout << b[i] << endl;
}

C++: #include <iostream>                              
#include <algorithm>                             
                                                 
using namespace std;                             
                                                 
int main(int argc, char **argv) {                
    int mountain[10];                            
                                                 
    for (int i = 0; i < 10; i++) {               
        cin >> mountain[i];                      
    }                                            
                                                 
    sort(mountain, mountain + 10, greater<int>());
                                                 
    for (int j = 0; j < 3; j++) {                
        cout << mountain[j] << endl;             
    }                                            
                                                 
    return 0;                                    
}

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


int main() {
int a[10],i;	
for(int i=0; i<10; i++) cin>>a[i];
sort(a, a+10);
for(i=9; i>6; i--)
cout<<a[i]<<endl;
// your code goes here
	return 0;
}

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

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

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

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

int main()
{
    
    int i = 10,m[10];
    
    while(i>0){
        cin >> m[i];
        i--;
    }
    
    int max = m[0],index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;;
    m[index] = 0;
    
    max = m[0];
    index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;
    m[index] = 0;
    max = m[0];
    index = 0;
    
    for(i = 0; i < 10 ; i++){
        if(max < m[i]){
            max = m[i];
            index = i;
        }
    }
    cout << m[index] << endl;

    m[index] = 0;
    
    return 0;
}

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

int main()
{
    int h;
    int max1 = 0, max2 = 0, max3 = 0;
    while (cin >> h)
    {
	if (max1 <= h)
	{
	    max3 = max2; max2 = max1; max1 = h;
	}
	else if (max2 <= h)
	{
	    max3 = max2; max2 = h;
	}
	else if (max3 <= h)
	{
	    max3 = h;
	}
    }
    cout << max1 << endl;
    cout << max2 << endl;
    cout << max3 << endl;
    return 0;
}

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

int main(){
  int m1=0,m2=0,m3=0,a;
  rep(i,10){
    cin>>a;
    if(a>m1){
      m3=m2;
      m2=m1;
      m1=a;
    }
    else if(a>m2){
      m3=m2;
      m2=a;
    }
    else if(a>m3){
      m3=a;
    }
  }
  
  cout<<m1<<endl;
  cout<<m2<<endl;
  cout<<m3<<endl;
  
  return 0;
}

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

using namespace std;

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

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

  for (int i = 0; i < 3; i++) {
    cout << height_of_mountains[10 - 1 - i] << endl;
  }
  return 0;
}

C++: #include <stdio.h> #include <functional> #include <algorithm> int main(){ int mt[10], i; std::sort(mt, mt + 10, std::greater<int>); for (i = 0; i < 3; i++) printf("%d", mt[i]);return 0; }

C++: #include <stdio.h>
int main(void){
	int d, m1 ,m2 ,m3, i;
	for(i=0;i<10;i++){
		scanf("%d",&d);
		if(d>m1){
		m3=m2 ;
		m2=m1 ;
		m1=d ;
	}else if (d>m2){
		m3=m2 ;
		m2=d ;
	}else if (m3<d){
		m3=d ;
	}
	printf("%d\n%d\n%d\n", m1. m2 ,m3 ) ;
	return 0

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

int main()
{
	int x;
	priority_queue<int> p;
	for(int i=0;i<10;i++){
		scanf("%d",&x);
		p.push(x);
	}
	for(int i=0;i<3;i++){
        printf("%d",p.top());
        if(i<2)
        	printf(" ");
		p.pop();
	}
	return 0;
}

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

int main()
{
	int input;
	int top[3]={0,0,0};
	for(int i=0;i<10;i++){
		cin>>input;
		for(int j=0;j<3;j++){
			if (input>top[j]){
				top[j]=input;
				break;
			}
		}
	}
	for(int j=0;j<3;j++){
		cout << top[j];
	}
}

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

int main(){
	int first = 0;
	int second = 0;
	int third = 0;
	int num;
	for(int i = 0;i<=9;i++)
	{

		cin >> num;
		
		if(num >= first)
		{
			third = second;
			second = first;
			first = num;
		}else if(num >= second)
		{
			third = second;
			second = num;
		}else if(num >=third)
		{
			third = num;
		}
		
	}
	
	cout << first << endl << second << endl <<  third;
	
    return 0;
}