题解 | #输入整型数组和排序标识#
输入整型数组和排序标识,对其元素按照升序或降序进行排序
https://www.nowcoder.com/practice/dd0c6b26c9e541f5b935047ff4156309
n = int(input()) num = list(map(int, input().split())) if input() == '0': target = False else: target = True num.sort(reverse=target) print(' '.join(list(map(str, num))))