#include<bits/stdc++.h> 
using namespace std;
int a[11];
int o[11];
int j[11];
int main(){
	for(int e=0;e<10;e++){
		cin>>a[e];
	}
	for(int i=0;i<10;i++){
		if(a[i]%2==0){
			o[i]=a[i];
		}else{
			j[i]=a[i];
		}
	}
	sort(o+0,o+10);
	for(int i=1;i<10;i++){
		for(int h=0;h<10-i;h++){
			if(j[h]<j[h+1]){
				swap(j[h],j[h+1]);
            }
		}
	}
	for(int w=0;w<10;w++){
		if(j[w]!=0){
			cout<<j[w]<<" ";
		}
	}
	for(int p=0;p<10;p++){
		if(o[p]!=0){
			cout<<o[p]<<" ";
		}
	}
	return 0;
}

0 条评论

目前还没有评论...

信息

ID
185
时间
ms
内存
MiB
难度
5
标签
递交数
38
已通过
15
上传者