游客 Signup | Login
中文 | En

2844 - 三数排序

任意输入三个数 abc,按由大到小的顺序打印出来


Input

一行 三个整数

Output

一行三个整数,由大到小

Examples

Input

2 3 1

Output

3 2 1

Solution C++

#include<bits/stdc++.h>
using namespace std;
long long a[10];
bool cmp(int x,int y)
{
	return x>y;
}
int main()
{
	cin>>a[1]>>a[2]>>a[3];
    sort(a+1,a+4,cmp);
    cout<<a[1]<<" "<<a[2]<<" "<<a[3];
	
	return 0;
}
Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题