#P323. 【例55.1】 整数奇偶排序
【例55.1】 整数奇偶排序
Description
You are given a sequence of integers. Please reorder them according to the following rules:
- Odd numbers come first, even numbers come after;
- Odd numbers are sorted in descending order;
- Even numbers are sorted in ascending order.
Input Format
A single line containing integers separated by spaces, each integer is between and inclusive.
Output Format
Output a single line containing the integers after sorting, separated by spaces.
Sample
4 7 3 13 11 12 0 47 34 9847 13 11 7 3 0 4 12 34 98