Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := 5
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = nextInt()
	}
	sort.Slice(array, func(i, j int) bool { return array[i] > array[j] })
	arrayStr := fmt.Sprint(array)
	l := len(arrayStr)
	fmt.Println(arrayStr[1:(l - 1)])
}

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

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

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

using namespace std;

int main()
{
	multiset<int ,greater<int> > num;
	int n;
	
	for(;cin >> n;)
	{
		num.clear();
		num.insert(n);
		for(int i=0;i<4;i++)
		{
			cin >> n;
			num.insert(n);
		}
		
		multiset<int,greater<int> >::iterator it = num.begin();
		
		for(;it!=num.end();)
		{
			it++;
			if(it!=num.end())
			{
				it--;
				cout << *it << " " ;
			}
			else
			{
				it--;
				cout << *it << endl;
			}
			
			it++;
		}
	}
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long ll;
int main(){
    vector<int> vc;
    int x;
    for(int i=0;i<5;i++){
        cin >> x;
        vc.push_back(x);
    }
    sort(vc.rbegin(),vc.rend());
    for(int i=0;i<vc.size();i++){
        if(i)   cout << " " << vc[i];
        else    cout << vc[i];
    }
    cout << endl;
    return 0;
}

C++: #include<cstdio>
#include<algorithm>
int main(){for(int a[5];~scanf("%d%d%d%d%d",a,a+1,a+2,a+3,a+4);printf("%d %d %d %d %d\n",a[4],a[3],a[2],a[1],a[0]))std::sort(a,a+5);}

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

using namespace std;

int main() {

	int i, j;
	deque <int> n;

	for(i=0; i<5; i++) {
		cin >> j;
		n.push_back(j);
	}

	sort(n.begin(), n.end());

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

	cout << endl;

	return 0;

}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <set>

using namespace std;

int main()
{
	set<int, greater<int> > n;
	set<int>::iterator ite;
	int a;

	for(int i=0; i<5; i++){
		cin >> a;
		n.insert(a);
	}
	int i=0;
	for(ite=n.begin(); i<5; ite++, i++){
		if(i==4){ cout << *ite << endl;}
		else{cout << *ite << " ";}
	}

	return 0;
}

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, greater<int>());

	cout << a[0] << " " << a[1] << " " << a[2] << " " << a[3] << " " << a[4] << endl;
}

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

int main(){

	int num[5];

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

	std::sort(num, num + 5, std::greater<int>());

	for (int i = 0; i < 5; i++){
		if (i == 0)std::cout << num[i];
		else std::cout << " " << num[i];
	}
	std::cout << std::endl;

	return 0;
}

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 j = 4; j > -1; j--) {
		cout << a[j];
		if (j != -1) {
			cout << " ";
		}
		else {
			cout << endl;
		}
	}
	return 0;
}

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

int main(){
	int a[5];
	int p;
	int temp;
	int i,j;
	int max;
	int maxin;
	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
	for(i=0;i<5;i++){
		max = a[i];
		maxin = i;
		for(j=i+1;j<5;j++){
			if(max < a[j]){
				max = a[j];
				maxin = j;
			}
		}
		temp = a[i];
		a[i] = a[maxin];
		a[maxin] = temp;
	}
	cout << a[0];
	for(i=1;i<5;i++){
		cout << " " << a[i];
	}
	cout << endl;
	return 0;
}

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

using namespace std;

int main()
{
	vector<int> values;
	copy(istream_iterator<int>(cin), istream_iterator<int>(), back_inserter(values));

	sort(values.begin(), values.end(), greater<int>());

	for (size_t i = 0; i < values.size(); ++i) {
		if (i > 0) {
			cout << ' ';
		}
		cout << values[i];
	}
	cout << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
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 > -1;i--)
    {
      cout << a[i] << " ";
    }
  cout << endl;
  
  return 0;
}

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

int main() {
	int input[NUMBER];
	int temp;
	int last_ch = NUMBER - 1;
	int temp_ch;

	int i;

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

	/* 左の方が小さかった場合には入れ替える。 */
	while(last_ch) {
		temp_ch = 0;
		for(i = 0; i < last_ch; i++) {
			if(input[i] < input[i + 1]) {
				temp = input[i];
				input[i] = input[i + 1];
				input[i + 1] = temp;
				temp_ch = i + 1;
			}
		}
		last_ch = temp_ch;
	}
	
	for(i = 0; i < NUMBER - 1; i++) 
		printf("%d ", input[i]);

	printf("%d\n", input[NUMBER - 1]);

	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

int main() {
	VI a(5);
	rep(i, 5)cin >> a[i];
	SORT(a); REVE(a);
	rep(i, 5) {
		cout << a[i];
		printf(i == 4 ? "\n" : " ");
	}
}

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

using namespace std;

int main(){
	int i;
	int line[5];
	cin >> line[0] >> line[1] >> line[2] >> line[3] >> line[4] ;
	sort(line,line+5,greater<int>());
	for(i=0;i<4;i++){
		cout << line[i] << " " ;
	}
	cout << line[4] << endl;
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,e,x[5],t=0;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);

	for(t;t<5;t++)
	if(a>=b&&a>=c&&a>=d&&a>=e)
	{
		x[t]=a;
		a=0;
	}
	else if(b>=c&&b>=d&&b>=e)
	{
		x[t]=b;
		b=0;
	}
	else if(c>=d&&c>=e)
	{
		x[t]=c;
		c=0;
	}
	else if(d>=e)
	{
		x[t]=d;
		d=0;
	}
	else
	{
		x[t]=e;
		e=0;
	}

	printf("%d %d %d %d %d\n",x[0],x[1],x[2],x[3],x[4]);
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

  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];
    if( i != 0 )cout << " ";
  }
  cout << endl;
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> a;
  int ptr=0;
  while(cin>>a[ptr++]);
  stable_sort(a.begin(),a.end());
  for(int i=0;i<a.size();++i) cout<<a[i]<<" ";
  cout<<endl;
  return 0;
}

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--){
if(i==0){
cout << a[i] << "\n";
break;
}
cout << a[i] << " ";
}
return 0;
}

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

int main() {
	int nums[5];
	for (int i = 0; i < 5; i++) {
		cin >> nums[i];
	}
	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 4 - i; j++) {
			if (nums[j] < nums[j + 1]) {
				swap(nums[j], nums[j + 1]);
			}
		}
	}
	for (int i = 0; i < 4; i++) {
		cout << nums[i] <<' ';
	}
	cout << nums[4] << endl;
	return 0;
}