Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	mountains := make([]int, 10)
	for i:=0; i<10; i++{
		mountains[i]=nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))
	for _, v := range mountains[:3]{
		fmt.Fprintln(out, v)
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

C++: #include <stdio.h>

int num[13] ;
int ans[3] ;

int main ( )
{
	for ( int i = 0 ; i < 10 ; i++ ) {
		scanf ( "%d" , &num[i] ) ;
	}
	ans[0] = num[0] ;
	ans[1] = ans[2] = 0 ;
	for ( int i = 1 ; i < 10 ; i++ ) {
		if ( num[i] > ans[0] ) {
			ans[2] = ans[1] ;
			ans[1] = ans[0] ;
			ans[0] = num[i] ;
		}
		else if ( num[i] > ans[1] && num[i] < ans[0] ) {
			ans[2] = ans[1] ;
			ans[1] = num[i] ;
		}
		else if ( num[i] > ans[2] && num[i] < ans[1] ) {
			ans[2] = num[i] ;
		}
	}
	for ( int i = 0 ; i < 3 ; i++ ) {
		printf ( "%d\n" , ans[i] ) ;
	}
	return 0 ;
}

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

using namespace std;
 
int main(){
  int x[10],tmp,i,j;

  for(i=0; i<10; ++i)
    cin >> x[i];

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

  for(i=0; i<3; ++i)
    cout << x[i] << "\n";

    return 0;
}

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

void swap(int *b, int *c)
{
    int tmp;
    tmp = *b;
    *c = *b;
    *b = tmp;
}

int main(void){

	int a[11],max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(&max1,&a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(&max2,&a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(&max3,&a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

C++: #include<iostream>
#include<algorithm>
//#include<cmath>
using namespace std;
int main() {
	int i;
	int A[10001];
	for (i = 0; cin >> A[i]; i++);
	sort(A, A + i);
	cout << A[i - 1] << endl << A[i - 2] << endl << A[i - 3] << endl;
	return 0;
}

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 <stdio.h>

int main(void){
	int high[10]={0}, ans[3]={0,-1,-2};
	int i,l;
	
	for(i=0; i<10; i++)
		scanf("%d",&high[i]);
	
	ans[0]=high[0];
	if(ans[0]<high[1]){
	ans[1]=ans[0];
	ans[0]=high[1];
	}else{
	ans[1]=high[1];
	}
	for(i=2; i<10; i++){
		if(ans[2]<high[i]){
			if(ans[1]<high[i]){
				if(ans[0]<high[i]){
				ans[2]=ans[1];
				ans[1]=ans[0];
				ans[0]=high[i];
				continue;
				}
				ans[2]=ans[1];
				ans[1]=high[i];
				continue;
			}
				ans[2]=high[i];
		}
	}
	for(i=0; i<3; i++)
		printf("%d\n",ans[i]);

	return 0;
}

C++: #include<cstdio>

int main(){
  int data[10],order[10];

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

  for(int i=1;i<10;i++)
    for(int j=0;j<i;j++){
      if(data[j]<data[i]) order[j]++;
      if(data[j]>=data[i]) order[i]++;
    }

  for(int i=1;i<=3;i++)
    for(int j=0;j<10;j++)
      if(order[j]==i)
	printf("%d\n",data[j]);
   
  return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
    int a[100],i,j,temp;
    while(1)
    {
        for(i=0;i<10;i++)
        {
            scanf("%d",&a[i]);
        }
        for(i=0;i<10;i++)
        {
            for(j=1;j<10;j++)
            {
                if(a[j]>a[j-1])
                {
                    swap(a[j],a[j-1]);
                }
            }
        }

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

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

int main(){
	int height[10] = {0};

	for(int i = 0; i < 10; i++){
		cin >> height[i];
	}
	
	int temp = 0;
	for(int i = 0; i < 3; i++){
		for(int j = 0; j < 10-i; j++){
			if(height[j] > height[j+1]){
				temp = height[j];
				height[j] = height[j+1];
				height[j+1] = temp;
			}
		}
	}
	
	cout << endl;
	
	cout << height[9] << endl;
	cout << height[8] << endl;
	cout << height[7] << endl;
	
	return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> v;
int x;
while(cin>>x){
v.push_back(x);
}
sort(v.begin(),v.end());
cout<<v[0]<<endl;
cout<<v[1]<<endl;
cout<<v[2]<<endl;
reutrn 0;
}

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

const static int N = 10;

int partition(vector<int>& A,int p,int r) {
  int x = A[r]; // ?????????????????????
  int i = p - 1;
  for(int j=p;j<r;j++) {
    if(A[j] > x) {
      i++;
      swap(A[i],A[j]);
    }
  }
  swap(A[i+1],A[r]);
  return i+1;
}
void quick_sort(vector<int>& A,int p,int r) {
  if(p < r) {
    int q = partition(A,p,r);
    quick_sort(A,p,q-1);
    quick_sort(A,q+1,r);
  }
}

void sort(vector<int>& vec) {
  quick_sort(vec,0,vec.size()-1);
}

int main() {
  vector<int> hills(N);
  for(int i=0;i<N;i++) {
    scanf("%d",&hills[i]);
  }

  sort(hills);

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

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

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

C++: #include<stdio.h> #include<algorithm> using namespace std; int main(){int a[10];for(int i = 0; i < 10; i++)scanf("%d", &a[i]);std::sort(a);for(int i = 0; i < 3; i++)printf("%d\n", a[i]);return 0;}

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

C++: #include<stdio.h>
int main(void){
    int d,m1=0,m2=0,m3=0,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(d>m3){
            m3=d;
        }
    }
    printf("%d\n",m1);
    printf("%d\n",m2);
    printf("%d\n",m3);
    return 0;
}

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

int main(){
  int ans[3] = {0, 0, 0};

  for(int i = 0; i < 10; i++){
    int x;
    cin >> x;

    for(int j = 0; j < 3; j++){
      if(x > ans[j]){
        for(int k = 2; k > j; k--){
          ans[k] = ans[k - 1];
        }
        ans[j] = x;
        break;
      }
    }
  }

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

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<10;i++){
		printf("%d\n",r[i]);
	}
	return 0;
}

C++: #include<iostream>

using namespace std;
int main()
{
int mount[10];
for(int i=0;i<10;i++)
{
cin >> mount[i];
}
int max[3];
max[0] = mount[0];
max[1] = mount[0];
max[2] = mount[0];
for(i=1;i<10;i++)
{
if(mount[i]>max[0])
{
max[0] = mount[i];
}
}
for(i=1;i<10;i++)
{
if(mount[i]>max[1]&&mount[i]!=max[0])
{
max[1] = mount[i];
}
}
for(i=1;i<10;i++)
{
if(mount[i]>max[2]&&mount[i]!=max[0]&&mount[i]!=max[1])
{
max[2] = mount[i];
}
}
cout << max[0] << endl;
cout << max[1] << endl;
cout << max[2] <<endl;
}
return 0;
}