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 <iostream>
#include <queue>
using namespace std;
int main() {
 int d;
 priority_queue<int> qu;
 for (int i=0;i<10;i++) { cin >> d; qu.push(d);}
 for (int i=0;i<3;i++) { cout << qu.top() << endl; qu.pop(); }
 return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
	int a=0;
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	for(int d=0;d<3;d++){
		for(int i=0;i<10;i++){
			if(vec[i]>a)a=vec[i];
		}
		std::cout<<a<<std::endl;
		for(int i=0;i<10;i++){
			if(vec[i]==a)vec[i]=0;
		}
		a=0;
	}
	return 0;
}

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

using namespace std;

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

	sort( h.begin(), h.end(), greater<int>() );

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

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXIST2(s,e) (find(ALL(s),(e))!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define EACH(t,i,c) for(t::iterator i=(c).begin(); i!=(c).end(); ++i)
const double EPS = 1e-10;
const double PI  = acos(-1.0);


int main(){
	vi a;
	REP(i,10){
		cin>>a[i];
	}
	sort(RALL(a));
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
}

C++: #include <iostream>
#include<math.h>
#include<iomanip>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main()
{
    int  i=0,j=0;
    int a[10]={};


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


    //cout << endl;

return 0;

}

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

int main()
{
	int mountain[10] = { 0 };
	int i, j, max, tmp;
	for(i = 0; i < 10; i++)
		cin >> mountain[i];
	for(i = 0; i < 10; i++)
	{
		max = i;
		for(j = i; j < 10; j++)
		{
			if(mountain[j] > mountain[max])
				max = j;
		}
		tmp = mountain[i];
		mountain[i] = mountain[max];
		mountain[max] = tmp;
	}
	for(i = 0; i < 3; i++)
	{
		cout << mountain[i] << endl;
	}
}

C++: #include<iostream>

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<10; ++i){
    for(j=i+1; j<10; ++j){
      if(x[i] < x[j]){
	tmp = x[i];
	x[i] = x[j];
	x[j] = tmp;
      }
    }
  */
  }

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

    return 0;
}

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

C++: #include<stdio.h>

int main(void){

	int h[10];
	
	int i,j,t;
	for(i=0;i<10;i++){
		printf("%d",i+1);
		scanf("%d",&h[i]);
	}
	for(i=0;i<9;i++)
	{
		for(j=i;j<10;j++)
		{
			if(h[i]<h[j])
			{
			   t=h[i];
			   h[i]=h[j];
			   h[j]=t;
			}
		}
	}
	for(i=0;i<3;i++)
	{
		printf("%d\n",h[i]);
	}


	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int x, buf, i, j;
  int top[3];
  for(i = 0; i < 3; i++)
    top[i] = 0;

  for(i = 0; i < 10; i++){
    cin >> x;
    if(x > top[2]){
      top[2] = x;
      j = 2;
      while(j > 0){
        if(top[j-1] <top[j]){
          top[j-1] = buf;
          top[j-1] = top[j];
          top[j] = buf;
          j--;
        }else{
          break;
        }
      }
    }
  }

  for(i = 0; i<3; i++)
    cout << top[i] << '\n';

  return 0;
}

C++: #include <iostream>
#include <ctime>
#include <cstdlib>

using namespace std;
const int NMAX = 10000;

void PrintArray(int* A, int N)
{
   cout << A[0]; 
   for (int k = 1; k < N;k++) {
     cout << " " << A[k] ; 
   }
   cout << endl;
}
void Swap(int& a, int &b) {
  int tmpA, tmpB;
  tmpA = a;
  tmpB = b;
  a = tmpB;
  b = tmpA;
}

int selectionSort(int* A, int N){
  int count = 0;
  for (int i = 0; i < N - 1; i++){
    int minj = i;
    for (int j = i+1; j < N; j++) {
      if (A[j] < A[minj]) {
        minj = j;
      }
    }
    Swap(A[i], A[minj]);
    if (i != minj) { 
      count += 1;
    }
  }
  return count;
} 


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

C++: #include <stdio.h>
#include <stdlib.h>
#define MAXN 10
typedef struct DNode
{
  int data;
  DNode *next;	
}llist;
void creatlist(llist*&head,int a[],int n)
{
	llist *pre,*q;
	head=(llist *)malloc(sizeof(llist));
	pre=head;
	for(int i=1;i<=n;i++)
	{
	 q=(llist *)malloc(sizeof(llist));
	 q->data=a[i];
     pre->next=q;
     pre=q; 
	}
	pre->next=NULL;
}
void swapi(llist*&L)
{
 llist *q,*p;
 q=L->next;
 p=L->next->next;
 q->next=NULL;
 L->next=p;
 q->next=p->next;
 p->next=q;  	
}

bool sorti(llist*&L)
{
  llist *p,*q;
  p=L->next;
  q=L;
  int count=0,c2;
  while(p->next!=NULL)
  {
   count++;
   p=p->next;	
  }
  c2=count;
  if(L->next->next==NULL&&L->next==NULL)
  return 0;
  else
  {
  	while(count--)
  	{
  		c2=count+1;
 	  while(c2--)
 	  {
  	 	if(q->next->data<q->next->next->data)
  	 	swapi(q);
		q=q->next; 	
  	  }
  	   q=L;
    }
  }	
}
int main()
{
    int a[MAXN];
    llist *p;
    for(int i=1;i<=MAXN;i++)
    scanf("%d",&a[i]);
    creatlist(p,a,MAXN);
    sorti(p);
    for(int i=1;i<=3;i++)
    {
      p=p->next;
   	  printf("%d\n",p->data);
    }  
	return 0;
}

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

int main()
{
	int h[3] = { 0 };
	int x;
	for (int i = 1; i <= 10; i++) {
		scanf("%d", &x);
		if (x > h[3]) {
			if (x > h[2]) {
				if (x > h[1]) {
					h[3] = h[2];
					h[2] = h[1];
					h[1] = x;
				}
				else {
					h[3] = h[2];
					h[2] = x;
				}
			}
			else {
				h[3] = x;
			}
		}
	}

	printf("%d\n%d\n%d\n", h[1], h[2], h[3]);

	return 0;
}

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

int main(void){

  int h[10];
　int a = 0;

  cin >> h;

  for(int j=0; j<3; j++){
    for(int i=0; i<10; i++){
        if(a<h[i]) a = i;
    }
    cout << h[a] <<endl; 
    h[a] = 0;
  }  

  return(0);
}