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>
using namespace std;
int main(){
    int a,b,c,i,x;
    a =0;
    b =0;
    c =0;
    for (int n=0;n<10;n++){
        cin >> i;
        if (c < i)
            c = i;
        if (b < c){
            x = b;
            b = c;
            c = x;
        }
        if (a < b){
            x = a;
            a = b;
            b = x;
        }

    }
    cout << a << endl << b << endl << c << endl;
}

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(d>m3){
		m3=d;
	}
}
	printf("%d\n",m1);
	printf("%d\n",m2);
	printf("%d\n",m3);
	return 0;
}

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

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

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

int main()
{
	set<int> s;
	for(int i=0;i<10;i++){
		int in;
		cin >> in;
		s.insert(in);
	}
	
	set<int>::iterator it = s.end();
	--it;
	for(int i=0;i<3;i++){
		cout << *it << endl;
		--it;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;

struct PrimalDual{
  const int INF = 1<<28;
  typedef pair<int,int> P;
  struct edge{
    int to,cap,cost,rev;
    edge(){}
    edge(int to,int cap,int cost,int rev):to(to),cap(cap),cost(cost),rev(rev){}
  };

  int n;
  vector<vector<edge> > G;
  vector<int> h,dist,prevv,preve;

  PrimalDual(){}
  PrimalDual(int sz):n(sz),G(sz),h(sz),dist(sz),prevv(sz),preve(sz){}
  
  void add_edge(int from,int to,int cap,int cost){
    G[from].push_back(edge(to,cap,cost,G[to].size()));
    G[to].push_back(edge(from,0,-cost,G[from].size()-1));
  }

  int flow(int s,int t,int f){
    int res=0;
    fill(h.begin(),h.end(),0);
    while(f>0){
      priority_queue<P,vector<P>,greater<P> > que;
      fill(dist.begin(),dist.end(),INF);
      dist[s]=0;
      que.push(P(0,s));
      while(!que.empty()){
        P p=que.top();que.pop();
        int v=p.second;
        if(dist[v]<p.first) continue;
        for(int i=0;i<(int)G[v].size();i++){
          edge &e=G[v][i];
          if(e.cap>0&&dist[e.to]>dist[v]+e.cost+h[v]-h[e.to]){
            dist[e.to]=dist[v]+e.cost+h[v]-h[e.to];
            prevv[e.to]=v;
            preve[e.to]=i;
            que.push(P(dist[e.to],e.to));
          }
        }
      }
      if(dist[t]==INF) return -1;
      for(int v=0;v<n;v++) h[v]+=dist[v];
      int d=f;
      for(int v=t;v!=s;v=prevv[v]){
        d=min(d,G[prevv[v]][preve[v]].cap);
      }
      f-=d;
      res+=d*h[t];
      for(int v=t;v!=s;v=prevv[v]){
        edge &e=G[prevv[v]][preve[v]];
        e.cap-=d;
        G[v][e.rev].cap+=d;
      }
    }
    return res;
  }
};

int main(){
  vector<int>v;
  int x;
  while(cin>>x){
    v.push_back(x);
  }
  sort(v.begin(),v.end(),greater<int>());
  std::vector<int> g;
  r(i,min((int)v.size(),100))g.push_back(v[i]);
  int n=g.size();
  PrimalDual p(n+3);
  r(i,n)p.add_edge(n,i,1,0);
  r(i,n)p.add_edge(i,n+1,1,-g[i]);
  p.add_edge(n+1,n+2,3,0);
  p.flow(n,n+2,3);
  r(i,n){
    r(j,p.G[i].size()){
      if(p.G[i][j].to==n+1&&p.G[i][j].cap==0){
        cout<<p.G[i][j].cost*-1<<endl;
      }
    }
  }
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
main() {
  int a[10];
  for(int i=0;i<10;i++) scanf("%d",&a[i]);
  sort(a,a+10,greater<int>());
  printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}
std::sort(h.begin(),h.end());
std::remove_if(h.begin(),h.end(),[](int x) { return x>=10000; });

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

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    int m[10];
    for(int i=0;i<10;i++)cin>>m[i];
    sort(m,m+10);
    reverse(m,m+10);
    for(int i=0;i<3;i++)cout<<m[i]<<endl;
}
//swap(a,b);
//max(a,b);
//min(a,b);
//sort(a,a+5);

C++: #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>()); 
    
    
    for(int i = 0; i <  3; ++i){
		cout << m[i] << endl;
	}
    
    
	return 0;
}

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

int main() {
	multiset<int, greater<int>> ms; int temp;
	for (int i = 0; i < 10; i++) {
		cin >> temp; ms.insert(temp);
	}
	multiset<int, greater<int>>::iterator itr = ms.begin();
	for (int i = 0; i < 3; i++, ++itr) {
		cout << *itr << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a, b, max = 0, max2 = 0, max3 = 0;
	for (a = 1; a <= 10; a++) {
		scanf("%d",&b);
		if (b > max) {
			max = b;
		}
		else if (b > max2) {
			max2 = b;
		}
		else if (b > max3) {
			max3 = b;
		}
	}
		printf("%d\n%d\n%d\n", max, max2, max3);
		return 0;
}

C++: #include<stdio.h>
#define ARRAY_SIZE 10
#define MAX_VALUE 10000
#define MIN_VALUE 0

int searchMax();
int *heightList;

int main(void){
  heightList = new int[ARRAY_SIZE];

  for(int i = 0;i < ARRAY_SIZE;i++){
    scanf("%d",&heightList[i]);
    printf("\ncount %d ; %d\n",i,heightList[i]);
    if(heightList[i] < MIN_VALUE || heightList[i] > MAX_VALUE){
      heightList[i] = 0;
    }
  }
  for(int i = 0;i < 3;i++){
    printf("%d\n",searchMax());
  }

  delete(heightList);

  return 0;
}

int searchMax(){
  int maxValue = -1;
  int index = -1;

  for(int i = 0;i < ARRAY_SIZE;i++){
    if(maxValue < (heightList[i])){
      maxValue = (heightList[i]);
      index = i;
    }
  }

  if(index != -1){
    (heightList[index]) = 0;
  }
  else{
    return -1;
  }

  return maxValue;
}

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 = i + 1 ; j < 10 ; j++)
    {
      if(height[i] < height[j])
        {
          int dumy = height[i];
          height[i] = height[j];
          height[j] = dumy;
        }
    }
    }
  for(int i = 0 ; i < 3 ; i++)
    {
      cout << height[i] << endl;
    }
  return 0;
}