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 <bits/stdc++.h>
using namespace std;

int main() {
    
    // 1. input.
    int a[10];
    for(int i = 0; i < 10; i++) cin >> a[i];
    
    // 2. output answer.
    sort(a, a + 10, greater<int>());
    for(int i = 0; i < 3; i++) cout << a[i] << endl;
    
    return 0;
    
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
  
int main(){
    vector<int> h();
    int in{};
    for(int i=0;i<10;i++){
        cin>>in;
        h.push_back(in);
    }
    sort(h.begin(),h.end());
    cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl;
    return 0;
}

C++: #include<iostream>
#include<vector>
std::vector<int> qsort(std::vector<int> xs);

int main(){
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	qsort(vec);
	std::cout<<vec[0]<<vec[1]<<vec[2]<<std::endl;
	return 0;
}

std::vector<int> qsort(std::vector<int> xs){
	if(xs.empty()){
		return xs;
	}else{
		int x=xs[0];
		std::vector<int> left;
		std::vector<int> right;
		for(int i=1;i<xs.size();i++){
			if(xs[i]>x){
				left.push_back(xs[i]);
			}
			if(xs[i]<=x){
				right.push_back(xs[i]);
			}
		}
		left=qsort(left);
		right=qsort(right);
		left.push_back(x);
		left.insert(left.end(),right.begin(),right.end());
		return left;
	}
}

C++: #include<stdio.h>
# define N 10

int main(){
    int i,j,t,d[N];
    for(i=0;i<N;scanf("%d",&d[i]),i++);
    for(i=0;i<N-1;i++)
        for(j=N-1;j>i;j--)
            if(d[j-1]>d[j])
                {t=d[j-1]; d[j-1]=d[j]; d[j]=t;}
    for(i=N-1;i>N-4;printf("%d\n",d[i]),i--);         
    return 0;
}

C++: #include <iostream>
#include <stdlib.h>
using namespace std;
int comp(const void *value1, const void *value2){
    return *(const int *)value1 - *(const int *)value2;
}
int main() {
  int height[10];
  for(int i=0; i<10; i++) cin >> height[i];
  qsort(height, 10, sizeof(int), comp);
  cout << height[9] << "\n" << height[8] << "\n" << height[7] << endl;
  return 0;
}

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

int M[10];

int main(){
	int k;
	for(int i = 0; i <10; ++i){
		cin >> M[i];
	}

	for(int j = 0; j < 9; ++j){
	for(int i = 0; i <9-j; ++i){
		if(M[i] <= M[i+1]){
			k = M[i];
			M[i] = M[i+1];
			M[i+1] = k;
		}
	}
	}

	for(int i = 0; i <3; ++i){
		cout << M[i] << '\n';
	}
	

}

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

vector<int> v;

int main(){
	int n;
	for(int i = 0; i < 10; i++){
		cin >> n;
		v.push_back(n);
	}
	
	sort(v.begin(), v.end());
	reverse(v.begin(), v.end());
	
	for(int i = 0; i < 3; i++)cout << v[i] << endl;
	
	return 0;
}

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

int main()
{
	int n[10];
	for(int i = 0; i < 10; i++)
	{
		cin >> n[i];
	}
	
	int max = 0;
	
	for(int i = 0; i < 9; i++)
	{
		for(int j = i+1; j < 10; j++)
		{
			if(n[i] < n[j]) swap(n[i], n[j]);
		}
	}
	
	cout << n[0] << endl;
	cout << n[1] << endl;
	cout << n[2] << endl;
	
	return 0;
}

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

int main() {
  vector<int> v;
  for(int i = 0; i < 10; ++i) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end(), greater<int>());
  for(int i = 0; i < 3; ++i) cout << v[i] << endl;
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int h[2];
	int i,j;
	for(i=0;i<=2;i++) h[1] = 0;
	for(i=0;i<=9;i++){
		cin>>j;
		if(j >= h[1]) h[1] = i;
		else if (i >= h[2]) h[2] = i;
		else if (i >= h[3]) h[3] = i;
		else continue;
	}
	for(i=0;i<=2;i++){
		cout<<h[i]<<endl;
	}
	return 0;
}

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

int main(void) {
    std::priority_queue<u_int> heights;

    for (u_int h, i = 0; i < 10; ++i) {
        std::cin >> h;
        heights.push(h);
    }

    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights.top() << std::endl;
        heights.pop();
    }

    return 0;
}

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

int main(){

	int a[100];
	int list[4]={0,0,0,0};


	for(int i=1;i<=10;i++){

		cin>>a[i];

		if(list[1]<a[i]){
			list[3]=list[2];
			list[2]=list[1];
			list[1]=a[i];
		}

		else if(list[2]<a[i]){
			list[3]=list[2];
			list[2]=a[i];
		}

		else if(list[3]<a[i]){
			list[3]=a[i];
		}

	}
	
	for(int j=1;j<=3;j++){
			cout<<list[j]<<endl;
	}

	return 0;
}

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

int main () {

int a[3] = {-1, -1, -1};
int n;


    while(!cin.eof()) {

    cin >> n;

    if (n > a[0]) {
        a[2] = a[1];
        a[1] = a[0];
        a[0] = n;

    }

    else if (n < a[0] && n > a[1]) {
        a[2] = a[1];
        a[1] = n;
    }

    else if (n < a[1] && n > a[2]) {
        a[2] = n;
    }

    }

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


    return 0;


}

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

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

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
 using namespace std;
int main()
{
    vector<int> height(10);
 
    for(int i=0;i<10;++i)
    {
        cin >> height[i];
    }
 
    sort(height.begin(),height.end());
 
    cout << height[9] << '\n';
 
    cout << height[8] << '\n';
 
    cout << height[7] << '\n';
}

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 <cstdio>
#include <queue>

using namespace std;

int main()
{
	int data[] = { 1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922 };
	priority_queue<int> qu;

	for ( int i = 0; i < 10; i++ )
	{
		qu.push( data[i] );
	}

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

	return 0;
}

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

int main()
{
	int first = 0, second = 0, third = 0;
	int height;
	for (int i = 0; i < 10; i++)
	{
		scanf("%d", &height);
		if (height > first)
		{
			third = second;
			second = first;
			first = height;
		}
		else if (height > second)
		{
			third = second;
			second = height;
		}
		else if (height > third)
		{
			third = height;
		}
	}
	printf("%d\n%d\n%d\n", first, second, third);
}

C++: #include <iostream>
//#include <iomanip>
//#include <vector>
#include <string>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

	int h[10];

	for (int i = 1; i <= 9; i++){
		cin >> h[i];
	}

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

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

	return 0;
}

C++: #include <iostream>

int main(){
	int first=0,second=0,third=0,height;
	for(int i=0;i<10;++i){
		height=get();
		if(height>first){
			second=first;
			first=height;
		}
		else if(height>second){
			third=second;
			second=height;
		}
		else if(height>third){
			third=height;
		}
	}
	std::cout<<first<<'\n'<<second<<'\n'<<third<<'\n';
	return 0;
}