#1801. C++-内置函数-sort()排序(倒序-greater<type>())

C++-内置函数-sort()排序(倒序-greater<type>())

Background

Description

前言 :sort函数是algorithm库下的一个函数,sort函数是不稳定的,即大小相同的元素在排序后相对顺序可能发生改变,如果某些场景需要保持相同元素间的相对顺序,可使用stable_sort函数,这里不过多介绍。

image

image

image

Format

Input

Output

Samples


9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0

Limitation

1s, 1024KiB for each test case.