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 i,j,k;
	int j_1,k_1;
	int max=0;
	int height[10];
	int temp_1;
	int height_2[10];
	
	for(int a=0;a<10;a++)
		cin>>height[a];
		
	for(int a=0;a<10;a++)
		height_2[a]=height[a];
	for(int a=0;a<10;a++)
	{
		if(height[a]>=max)
			{
				max=height[a];
		        k=max;
				k_1=a;
			
		}
	
	}
	max=0;
	for(int a=0;a<10;a++)
	{
		if(a==k_1)
		{
			temp_1=height[a];
			height[a]=0;
		}
		if(height[a]>=max)
			{
				max=height[a];
		        j=max;
				j_1=a;
				
		}
		height[a]=temp_1;
		
	}
	max=0;
	for(int a=0;a<10;a++)
	{
		if(a==j_1)
		{
			height_2[a]=0;
		}
		if(a==k_1)
			{
				height_2[a]=0;
		    }
		if(height_2[a]>=max)
			{
				max=height_2[a];
		 	}
	}
	cout<<k<<endl<<j<<endl<<max<<endl;
	
	return 0;
}

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

int main()
{
    int A[10],h1,h2,h3,i,pos1,pos2;
    for(i=0;i<10;i++)
    cin>>A[i];
    h1=A[0];
    pos1=0;
    for(i=1;i<10;i++)
    {
        if(A[i]>h1)
        {
            h1=A[i];
            pos1=i;
        }
    }
    A[pos1]=-1;
    h2=A[1];
    pos2=1;
    for(i=2;i<10;i++)
    {
        if(A[i]>h2)
        {
            h2=A[i];
            pos2=i;
        }
    }
    A[pos2]=-1;
    h3=A[2];
    for(i=3;i<10;i++)
    {
        if(A[i]>h3)
            h3=A[i];
    }
    cout<<h1<<"\n"<<h2<<"\n"<<h3<<"\n";
}

C++: #include<stdio.h>

int main()
{
	int high[10];
	int i, j, temp;
	
	for(i = 0; i < 10; i++){
		scanf("%d",&high[i]);
	}
	
	for (i = 0; i < 9; i++){
		for (j = 9; j > i; j--){
			if (high[j - 1] < high[j]){
				temp = high[j];
				high[j] = high[j - 1];
				high[j - 1]= temp;
			}
		}
	
	}
	printf("\n%d\n%d\n%d",high[0], high[1], high[2]);
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int height[10];
	for (int i=0; i<10; i++) { cin >> height[i]; }
	
	int top[3] ={0};
	for (int i=0; i<10; i++) {
		for (int j=0; j<3; j++) {
			if (height[i] > top[j]) {
				for (int k=2; k>j; k--) { top[k] = top[k-1]; }
				top[j] = height[i];
				break;
			}
		}
	}
	
	for (int j=0; j<3; j++) { cout << top[j] << endl; }
	
	return 0;
}

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

int main() {
  int h[10];
  int a, b, c;
  for(int i=0; i<10; i++) {
    cin >> h[i];
  }
  a = b = c = -1;
  for(int i=0; i<10; i++) {
    if (h[i] > c) {
      if (h[i] > b) {
        if (h[i] > a) {
          c = b;
          b = a;
          a = h[i];
        }
        else {
          c = b;
          b = h[i];
        }
      } else {
        c = h[i];
      }
    }
  }
  cout << a << endl;
  cout << b << endl;
  cout << c << endl;
}

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

using namespace std;

int main() {
  int h[10];
  for (int i=0;i<10;i++) scanf("%d", &h[i]);
  sort(h, h+10);
  for (int i=0;i<3;i++) printf("%d\n", h[10-i-1]);
  return 0;
}

C++: #include <stdio.h>

#define MAX_NUM	(10)

static void 
sort(int h[])
{
	for (int i = 0; i < MAX_NUM; i++) {
		for (int j = MAX_NUM - 1; j > i; j--) {
			if (h[j] > h[j-1]) {
				int tmp = h[j];
				h[j] = h[j-1];
				h[j-1] = tmp;
			}
		}
	}
}

int
main(void)
{
	char line[80];
	int h[MAX_NUM] = { 0 };

 	for (int i = 0 ; i < 10; i++) {
		if (gets(line)) {
			if (sscanf(line, "%d", &(h[i])) != 1) {
				break;
			}
		}
 	}

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

	return 0;
}

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

int main()
{
	priority_queue<int,vector<int>,less<int>> que;
	int in;

	for(int i = 0; i < 10; i++){
		scanf("%d",&in);
		que.push(in);
	}


	for(int j = 0; j < 3; j++){
		printf("%d\n",que.top());
		que.pop();
	}

	return 0;
}

C++: //include----------------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>
 
//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;
 
//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
 
//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;
 
//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );
 
//global-----------------------------------------------------------------------------------------------------------------------
vector<int> a(10);
 
//function---------------------------------------------------------------------------------------------------------------------
int main() {
    rep( i, 10 ) {
        scanf( "%d", &a[ i ] );
    }
    sort( a.begin(), a.end() );
    ROF( i, 9, 7 ) {
        printf( "%d\n", a[ i ] );
    }
    return 0;
}

C++: #include <iostream>

void swap(int *a, int *b);

int main(void)
{
int b[3]={0,0,0};
int i=0;
for(; i < 10; i++){
int s;
scanf("%d",&s);
if(b[2] < s){b[2]=s;}
if(b[1] < b[2]){swap(&b[1],&b[2]);}
if(b[0] < b[1]){swap(&b[0],&b[1]);}
}
std::cout << b[0] << std::endl << b[1] << std::endl << b[2] << std::endl;
return 0;
}

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

C++: #include <iostream>

int main()
{
    int i,high[10];
    for(i = 0;i < 10;++i){
        std::cin >> high[i];
    }
    manko::sort(high[0]);
    std::cout << high[0];
    std::cout << high[1];
    std::cout << high[2];
}

namespace manko{

void sort(int *a)
{
        int i,first = 0,secand = 0,third = 0;
        for(i = 0;i < 10;++i){
           if(first < *(a + i)){
               first = *(a + i);
           }else if(secand < *(a + i)){
               secand = *(a + i);
           }else if(third < *(a + i)){
               third = *(a + i);
           }
        }
        *a = first;
        *(a + 1) = secand;
        *(a + 2) = third;
}

}

C++: //
//  main.cpp
//  kyougi
//
//  Created by 寺林 一旭 on 2018/08/27.
//  Copyright © 2018年 寺林 一旭. All rights reserved.
//

#include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
    
    string num;
    vector<int> list;
    while(getline(cin, num))
    {
  
        int a,b;
        sscanf(num.c_str(), "%d %d",&a,&b);
        
        cout << a-b <<endl;
    }
   
    
    return 0;
}