oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

descsort Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

descsort.html

Sort a list of numbers in descending order.

Input

The first line on input will be a single integer, n, which represents the amount of numbers in the list. You may assume n will not be greater than 1000.

The second line on input will be n integers, space separated. You may assume all numbers fit in a 32-bit signed integer.

Output

Output the sorted string in a format similar to the second line of input. (space separated integers)

Sample Input

5
2 8 3 1 4

Sample Output

8 4 3 2 1

Do note there isn't a space after the last integer of the output

Tags

Sorting

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
1100101s32MBAverage
2011s32MBAverage

Judge Compile Command

g++-8 ans.cpp -o descsort -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.