Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mountains := make([]int, 10, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mountains[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

	for i := 0; i < 3; i++ {
		fmt.Println(mountains[i])
	}
}

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

int main() {
	priority_queue<int> Q;
	for(int i = 0; i < 10; i++) {
		int a;
		cin >> a;
		Q.push(a);
	}
	for(int i = 0; i < 3; i++) {
		cout << Q.top() << endl;
		Q.pop();
	}
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <cstdlib>
#include <list>
#include <cmath>
#include <map>
#include <utility>
#include <numeric>
#include <set>
#include <map>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define _USE_MATH_DEFINES

using namespace std;
using ll = long long;
using P = pair<int, int>;

const ll INF = 999999999;
const ll atcoder = 1000000007;
const int dx[4] = { 1 , 0 , -1 ,0 };
const int dy[4] = { 0 , 1 , 0 , -1 };

int main() {

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

	sort(h, h + 10);

	cout << h[9] << endl;
	cout << h[8] << endl;
	cout << h[7] << endl;

	return 0;

}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>

void print_top3(int *top3) {
	int i;
	for (i = 0; i < 3; i++) {
		printf("%d\n", top3[i]);
	}
}

int main() {
	char buf[256];
	int top3[3];
	int n, i, j, trade;
	
	// initialize
	memset(top3, 0, sizeof(int) * 3);
	
	for (j = 0; j < 10; j++) {
		fgets(buf, sizeof(buf), stdin);
		n = atoi(buf);
		
		if (n <= top3[2]) { continue; }
		
		top3[2] = n;
		for (i = 1; 0 <= i; i--) {
			if (top3[i] < top3[i + 1]) {
				trade = top3[i];
				top3[i] = top3[i + 1];
				top3[i + 1] = trade;
			}
		}
	}
	
	print_top3(top3);
	
	return 0;
}

C++: /*
Powered by 0736TuT
Code + Music + Games = Life
*/

#include<iostream>
#include<cstdio>
#include<algorithm>
#define MAXN 10010

typedef long long qwq;

using namespace std;

int scan(int *buf_tar)
{
    char buf_c=0; bool is_rev=0;
    while(buf_c!='-'&&(buf_c<'0'||buf_c>'9')) {buf_c=getchar(); if(buf_c==EOF) return EOF;}
    if(buf_c=='-') is_rev=1,buf_c=getchar();
    *buf_tar=0;
    while(buf_c>='0'&&buf_c<='9') {*buf_tar*=10; *buf_tar+=buf_c-'0'; buf_c=getchar();}
    if(is_rev) *buf_tar=-*buf_tar;
    return 0;
}

int cnt=0;
int num[MAXN];

inline bool cp(const int &,const int &);

int main()
{
    for(cnt=1;scan(&num[cnt])!=EOF;cnt++);
    sort(num+1,num+cnt,cp);
    printf("%d\n%d\n%d\n",num[1],num[2],num[3]);
    return 0;
}

inline bool cp(const int &a,const int &b)
{
    return a>b;
}

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

int main(){
	int max1=0,max2=0,max3=0,x,t=0;
	for(int i=0;i<10;i++){
		cin >>x;
		if(x>=max3) max3 = x;
		if(max3>=max2) {t=max3;max3=max2;max2=t;}
		if(max2>=max1) {t=max2;max2=max1;max1=t;}
		}
	cout<<max1<<"\n"<<max2<<"\n"<<max3<<endl;
	return 0;
	}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

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 mount[10];

int main(){
    rep(i,10){
        cin>>mount[i];
    }
    sort(mount,mount+10,greater<int>());
    rep(i,3){
        out(mount[i]);
    }
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  double x, h;
  while (cin >> x >> h, x) {
    cout << prec(8) << x * x + x * hypot(h, x / 2) * 2 << endl;
  }
}

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

void swap(int* x, int* y){
	int tmp = *x;
	*x = *y;
	*y = tmp;
}

int main(){
	int input = 0, a = 0, b = 0, c = 0;
	for(int i = 0; i < 10; i++){
		cin >> input;
		if(c < input){
			swap(&c, &input);
		}
		if(b < c){
			swap(&b, &c);
		}
		if(a < b){
			swap(&a, &b);
		}
	}
	cout << a << endl;
	cout << b << endl;
	cout << c << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
	int a[10];
	for(int b=0;b<10;b++)
	cin>>a[b];
	sort(a,a+10);
	for(int c =0;c<10;c++)
	cout<<a[c]<<endl;
	return 0;
	}

C++: #include<bits/stdc++.h>
/*#include<iostream>
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<climits>*/
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define rep1(i,a,b) for(int i=a;i<=(b);++i)
#define per(i,a,b) for(int i=a;i>(b);--i)
#define per1(i,a,b) for(int i=a;i>=(b);--i)
#define LL long long
#define inf 0x7f7f7f7f
#define N 10010
using namespace std;
int a[N];
bool cmp(int a,int b)
{
	return a>b;
}
int main()
{
	int i=0;
	while(~scanf("%d",&a[i++]));
	sort(a,a+i-1,cmp);
	printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
}

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

int main()
{
    cin;
    cout << endl;

    return 0;
}

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

int main(){
	int a[10];
	for(int i=0;i<10;i++) cin>>a[i];
	sort(a,a+10);
	cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<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>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;

#define MAX 256

int main(void){

	int a[10], b;

	for (int i = 0; i < 10; i++){
		scanf("%d", &a[i]);
	}

	for (int i = 0; i < 10; i++){
		for (int j = 0; j < 9; j++){
			if (a[j] < a[j + 1]){
				b = a[j];
				a[j] = a[j + 1];
				a[j + 1] = b;
			}
		}
	}

	printf("%d\n%d\n%d\n", a[0], a[1], a[2]);

	return 0;
}

C++: #include<iostream>
#include<queue>
using namespace std;
int main(){
  priority_queue<int> mlist;
  int i;
  for(i=0;i<10;i++){
    int dt;
    cin>>dt;
    mlist.push(dt);
  }
  for(i=0;i<3;i++){
    cout <<mlist.top()<<endl;
    mlist.pop();
  }

  return 0;
}