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<iostream>
#include<algorithm>
using namespace std;
int main(){
  int height[10] = {0};
  for(int i=0; i<10; i++){
    cin >>height[i];
  }
  sort(height,height+10);
  cout <<height[9]<<endl<<height[8]<<endl<<height[7]<<endl;
  return 0;
}

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

int main() {
  int n, h[3] = {};

  for(int i = 0; i < 10; i++) {
    cin >> n;
    for(int j = 0; j < 3; j++) {
      if(n > h[j]) swap(n, h[j]);
    }
  }

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

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

int main(){
  int a[10];
  int tmp;
  int n = 0;

  while(n<10){
    cin >> a[n];
    n++;
  }

  int i,j;

  //降順ソート
  for(i = 0;i < 10;i++){
    for(j = i+1;j < 10;j++){
      if(a[i] < a[j]){
	tmp = a[i];
	a[i] = a[j];
	a[j] = tmp;
      }
    }
  }

  //結果の表示
  for(i = 0;i < 3;i++){
    cout << a[i] << endl;
  }
    return 0;
}

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

int main()
{
	int i, h;
	int mh[3] = {0};

	for(i=0;i<10;i++){
		cin>>h;
		if(mh[0] < h) mh[0] = h;
		else if(mh[1] < h) mh[1] = h;
		else if(mh[2] < h) mh[2] = h;

	}
	for(i=0;i<3;i++)	cout<<mh[i]<<endl;

	

	return 0;
}

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

int main(){
    priority_queue<int> que;

    for(int i = 0 ; i < 10 ; ++i){
        int h;
        cin >> h;
        que.push(h);
    }

    for(int i = 0 ; i < 3 ; ++i){
        cout << que.top() << endl;
        que.pop();
    }

    return 0;
}

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

int main(){
	int yama;
	int a = 0;
	int b = 0;
	int c = 0;

	for (int i = 0; i < 10; i++){
		cin >> yama;
		if (a < yama){
			c = b;
			b = a;
			a = yama;
		}
		else if (b < yama || a == yama){
			c = b;
			b = yama;
		}
		else if (c < yama || b == yama){
			c = yama;
		}
	}
	cout << a << endl << b << endl << c << endl;

	return 0;
}

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int m[3];
    cin>>m[0]>>m[1]>>m[2];
    if(m[0]<m[1]) swap(m[0], m[1]);
    if(m[1]<m[2]) swap(m[1], m[2]);
    if(m[0]<m[1]) swap(m[0], m[1]);
    for(int i=3; i<10; i++){
        int t;
        cin>>t;
        if(t>m[2]){
            int p=2;
            while(p>0&&t>m[p-1]){
                m[p]=m[p-1];
                --p;
            }
            m[p]=t;
        }
    }
    for(int i=0; i<3; i++){
        cout<<m[i]<<'\n';
    }
    return 0;
}

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

using namespace std;

int main() {
    array<int,10> ar;
    for(int i=0;i<10;i++){
        int height;
        cin >> height;
        ar[i]=height;
        }
    sort(ar.begin(),ar.end());
    for(int j=0;j<3;j++){
        cout << ar[9-j] << endl;
        
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
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; }

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

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

using namespace std;
 
int main(){
 
 int i, height[10];
 for(i=0;i<10;i++){
  scanf("%d", &height[i]);
 }
 sort(height, height+10, greater<int>());
 
 for(i=0;i<2;i++){
  printf("%d\n", height[i]);
 }
 
 return 0;
}

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

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

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

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

using namespace std;

int compare_int(const void *a, const void *b)
{
    return *(int*)b - *(int*)a;
}


int main() {
	int a[10];
	
	for(int i = 0;i < 10;i++)
		cin >> a[i];
	
	qsort(a,10,sizeof(int),compare_int);
	
	for(int i = 0;i < 3;i++){
		cout << a[i];
		cout << "\n";
	}
	
	// your code goes here
	return 0;
}

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

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

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

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<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
    int k[10005];
int i=0,a;
    while(scanf("%d",&a)==1)
{
k[i]=a;
i++;
}
sort(k,k+i+1);
printf("%d\n%d\n%d\n",k[i],k[i-1],k[i-2]);
return 0;
}

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

using namespace std;

int main() {
  priority_queue<int> que;
  int h;

  for(int i = 0; i < 10; i++) {
    cin >> h;
    que.push(h);
  }

  for(int i = 0; i < 3; i++) {
    cout << que.top() << endl;
    que.pop();
  }

  return 0;
}

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

using namespace std;

int main(void)
{
	int array[10];
	for(int i = 0; i < 10; i++){
		cin >> array[i];
	}
	
	sort(array, array+10, greater<int>());
	
	for(int j = 0; j < 3; j++){
		cout << array[j] << endl;
	}
	
	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>
using namespace std;
int main()
{
	int a[10];
	for (int i = 0; i < 10; i++)
	{
		cin >> a[i];
		for (int j = 0; j < 10; j++)
		{
			if (a[0] < a[i])swap(a[i], a[0]);
		}

		for (int j = 0; j < 10; j++)
		{
			if (a[1] < a[i])swap(a[i], a[1]);
		}
			
		for (int j = 0; j < 10; j++)
		{
			if (a[2] < a[i])swap(a[i], a[2]);
		}

	}
	cout << a[0] << endl;
	cout << a[1] << endl; 
	cout << a[2] << endl;
	
}

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++)
	{
		cout<<A[i];
	}
}
void swap(int &a, int &b)
{
	int t ;
	t = a;
	a = b;
	b = t;
}