Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"sort"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	nums := make([]int, 5)
	for i := 0; i < 5; i++ {
		nums[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(nums)))
	for i, v := range nums {
		if i == len(nums)-1 {
			fmt.Printf("%d\n", v)
		} else {
			fmt.Printf("%d ", v)
		}
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {
	int num[5];
	for (int i = 0; i < 5; ++i) {
		cin >> num[i];
	}

	sort(num, num + 5);

	for (int i = 4; i >= 0; --i) {
		cout << num[i] << " ";
	}
	cout << endl;
}

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

int main()
{

    int a[100],n=5;
    int temp =0;

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



    for(int i=0;i<n-1;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            if(a[i]<a[j])
            {

              swap(a[i],a[j]);

            }
        }
    }

    for(int i=0;i<n;i++)
    {
        printf("%d",a[i]);
        if(i<4)
        printf(" ");
        else printf("\n");
    }
    return 0;
}

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

using namespace std;

int main(){
  int a[5];
  while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]){
    sort(a,a+5);
    cout<<a[4]<<" "<<a[3]<<" "<<a[2]<<" "<<a[1]<<" "<<a[0]<<endl;
  }
}

C++: // 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif 

using namespace std;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	vector<int> v;
	for(int i = 0; i < 5; i++){
		int a;
		cin >> a;
		v.push_back(a);
	}
	sort(v.rbegin(), v.rend());
	int cas = 1;
	for(auto i:v){
		if(cas > 1)cout << ' ';
		cas++;
		cout << i;
	}
	cout << '\n';
	return 0;
}
// Write Here

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a[5];
	for (int i = 0; i < 5; i++){
		cin >> a[i];
	}
	sort(a, a + 5);
	for (int i = 4; i > 0; i--){
		cout << a[i] << " ";
	}
	cout << a[0]<<endl;
}

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

int main(){
	int n;
	int c=0;
	vector<int> buf;
	while(cin>>n){
		c++;
		buf.push_back(n);
		if(c==5){
			sort(buf.begin(),buf.end());
			reverse(buf.begin(),buf.end());
			for(int i=0; i<buf.size(); i++){
				if(i!=0) cout<<" ";
				cout<<buf[i];
			}
			cout<<endl;
			buf.clear();
			c = 0;
		}
	}
	return 0;
}

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

using namespace std;

int main(){
  int a[5];
  for(int i=0;i<5;i++) cin >> a[i];
  sort(a,a+5,greater<int>());
  for(int i=0;i<5;i++) cout << a[i] << (i==4?"\n":" ");
  return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<cstring>
#include<string>
#include<algorithm>

using namespace std;

int main()
{
    int arr[5+10];
    for(int i=0;i<5;i++)
        cin>>arr[i];
    sort(arr,arr+5);
    for(int i=4;i>=0;i--)
    {
          cout<<arr[i]<<" ";
    }
    cout<<endl;


return 0;
}

C++: #include <stdio.h>
int main ()
{
    int a[6],i,m,k;
    for (i=0;i<5;i++)
        scanf("%d",&a[i]);
    for (i=0;i<5;i++)
    {
        for (m=i+1;m<5;m++)
        {
            if (a[i]<a[m])
            {
                k=a[i];
                a[i]=a[m];
                a[m]=k;            
            }
            
        }
    }
    for (i=0;i<5;i++)
        printf("%d " , a[i]);
    return 0;
}

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

int main(){
    int n[5];
    cin>>n[0]>>n[1]>>n[2]>>n[3]>>n[4];
    sort(n,n+5);
    cout<<n[4]<<" "<<n[3]<<" "<<n[2]<<" "<<n[1]<<" "<<n[0]<<endl;
    return 0;
}

C++: #include<iostream>

int main(){
	int a[5],i,j,n;
	for(i=0;i<5;i++){
	std::cin>>a[i];
	}
	for(i=0;i<4;i++){
		for(j=i+1;j<5;j++){
			if(a[i]<a[j]){
			n=a[i];
			a[i]=a[j];
			a[j]=n;
			}
		}
	}
	for(i=0;i<5;i++){
	std::cout<<a[i]<<std::endl;
	}
	return 0;
}

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

using namespace std;

void solve()
{
	vector<int> Num(5);
	for(int i = 0; i < 5; ++i)
	{
		cin >> Num[i];
	}
	sort(Num.begin(), Num.end(), greater<int>() );
	for(int i = 0; i < 5; ++i)
	{
		cout << Num[i] << " ";
	}
	cout << endl;
}

int main()
{
	solve();
	return(0);
}

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

int main(){
    int a = 0, b = 0, c = 0, d = 0, e = 0, poi[5];
    for(int i = 0;i < 5;++i) cin >> poi[i]; 
    for(int j = 0;j < 5;++j){
       if(poi[j] > a){
        e = d;
        d = c;
        c = b;
        b = a;
        a = poi[j];
        }
       else if(poi[j] > b){
        e = d;
        d = c;
        c = b;
        b = poi[j];
        }
       else if(poi[j] > c){
        e = d;
        d = c;
        c = poi[j];
        }
       else if(poi[j] > d){
        e = d;
        d = poi[j];
        }  
       else d = poi[j];
    } 
    cout << a << " " << b << " " << c << " " << d << " " << e << endl;
    return 0;
}

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

int main(void){
  int a[5] = {0};
  for(int i = 0;i<5;i++) cin >> a[i];
  sort(a,a+5, [](const int& a, const int& b){
    return a > b;
  });
  for(int i = 0;i<5;i++){
    if(i != 0) cout << " ";
    cout << a[i];
    if(i == 4) cout << endl;
  }
}

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a[5];
    cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];
    for(int i=4; i>=0; i--) {
        for(int j=0; j<i; j++) {
            if(a[j]<a[j+1]) swap(a[j], a[j+1]);
        }
    }
    cout<<a[0]<<' '<<a[1]<<' '<<a[2]<<' '<<a[3]<<' '<<a[4]<<'\n';
    return 0;
}

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

int main(){
	long int num[5];
	long int i,j,tmp;

	for(i = 0; i < 5; i++)
		cin >> num[i];

	for(i = 0; i < 5; i++){
		for(j = 5; j > i; j--){
			if(num[j] > num[i]){
				tmp = num[j];
				num[j]  = num[i];
				num[i] = tmp;
			}
		}
	}

	for(i = 0; i < 4; i++)
		cout << num[i] << ' ';
	cout << num [4] << endl;

	return 0;
}

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

using namespace std;

int main()
{
	int num[5];
	
	for (int i = 0; i < 5; i++){
		scanf("%d", &num[i]);
	}
	
	sort(num, num + 5);
	reverse(num, num + 5);
	
	for (int i = 0; i < 4; i++){
		printf("%d ", num[i]);
	}
	
	printf("%d\n", num[4]);
	
	return (0);
}

C++: #include<stdio.h>
#define n 5

int main(void)
{
	int a[n],i,j,t;

	for(i=0;i<n;i++)
	  scanf("%d",&a[i]);

	for( i = 1; i < n; ++i )
	{
		t = a[i];
		for( j = i; j > 0 && a[j-1] > t; --j )
		{
			a[j] = a[j-1];
		}
		a[j] = t;
	}
	for(i=n-1;i>-1;i--)
		printf("%d ",a[i]);
	printf("\n");
  return 0;
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
//#include <sstream>
#include <queue>

using namespace std;


int main(){

	int buf;
	priority_queue <int> pq;

	while (cin >> buf){
		pq.push(buf);
	}

	while (pq.size()>1){
		cout << pq.top() << " ";
		pq.pop();
	}
	cout << pq.top() << endl;

	return 0;
}

C++: #include<cstdio>
#include<string>
using namespace std;

void swap(int *x,int *y){

    int tmp;
    
    tmp=*x;
    *x=*y;
    *y=tmp;
    return;
}

int main(void){
    
    int a[5];
    
    for(int i=0;i<5;i++){
        scanf("%d",&a[i]);
    }
    
    for(int i=0;i<4;i++){
        for(int j=0;j<4-i;j++){
            if(a[j]<a[j+1]) swap(&a[j],&a[j+1]);
        }
    }
    for(int i=0;i<5;i++){
        if(i!=4) printf("%d ",a[i]);
        else printf("%d",a[i]);
    }
    printf("\n");
    return 0;
}