CT26917

The Descending Order of Cindercrag

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The inventory keeper Tomas has been asked to recover the missing manifest. On the desk lies a long table of weights readings. Task: Sort the array in non-increasing order and print it. Input format: First line: n. Second line: n integers. Output format: Print the sorted values space-separated. Constraints: 1 <= n <= 352; -1000000 <= a[i],x <= 1000.

Example 1:

Input: 185 -987771 -471899 -820795 -781367 -377356 -109980 -709579 -994627 -538776 -316342 -99875 -74763 -438544 -829340 -417964 -675221 -285270 -108653 -633958 -623654 -892864 -35581 -299663 -939312 -465229 -560591 -543735 -910649 -483629 -448532 -299018 -976794 -238296 -899451 -147563 -43808 -862597 -207119 -754480 -40019 -921675 -671813 -121846 -628653 -500928 -604801 -216653 -635875 -61018 -105032 -999461 -415386 -50556 -610282 -689124 -421672 -217478 -613153 -500149 -585997 -916305 -200324 -325511 -503010 -499347 -216735 -222189 -364962 -418801 -990982 -925564 -67189 -312464 -781458 -128619 -831249 -479011 -755064 -330446 -401506 -885402 -898622 -279129 -883809 -678240 -344562 -529471 -812469 -251507 -107208 -498818 -945312 -791489 -899107 -749349 -895014 -911383 -235731 -96950 -980101 -6166…
Output: -13147 -15625 -25533 -35581 -40019 -43808 -50556 -61018 -67189 -68811 -74763 -80846 -82410 -87078 -96950 -99875 -105032 -107208 -108653 -109980 -120341 -121846 -128619 -138090 -138780 -147563 -164402 -167202 -178486 -183221 -184643 -200324 -206387 -207119 -216653 -216735 -217478 -222189 -224941 -230723 -235731 -237123 -238296 -251507 -267590 -279129 -285270 -299018 -299663 -312464 -315419 -315751 -316342 -322873 -325511 -326881 -330446 -344562 -348813 -353945 -364962 -368955 -377356 -395640 -401506 -415386 -417964 -418801 -421672 -422094 -429502 -436781 -438544 -448532 -448974 -452411 -454959 -455520 -462376 -463826 -465229 -468751 -471899 -478674 -479011 -480327 -483629 -489198 -498818 -499347 -500149 -500928 -503010 -503559 -512046 -529471 -538118 -538776 -543735 -544186 -544574 -560591 …

Example 2:

Input: 262 -695712 -890490 -966598 -207976 -378210 -702771 -319855 -118605 -274117 -83219 -493678 -882644 -629646 -908366 -983370 -506681 -78071 -845344 -730179 -363838 -917178 -440100 -386331 -730908 -217575 -269700 -956767 -934409 -218706 -666885 -236417 -241507 -341997 -809864 -485804 -860889 -166424 -781142 -248640 -638930 -177490 -587285 -479387 -935172 -762617 -427820 -825325 -421066 -139427 -316111 -100652 -663632 -125536 -963014 -566048 -968355 -141408 -821326 -570451 -188405 -779487 -441749 -485415 -371760 -691294 -161035 -868349 -670901 -682287 -41839 -262321 -186831 -499641 -422578 -587481 -972686 -881216 -771743 -41504 -182147 -722048 -640374 -388433 -805995 -750217 -896594 -428598 -267155 -884269 -654957 -405171 -812810 -502166 -220788 -536963 -968274 -439222 -141148 -266002 -147494 …
Output: -8288 -23323 -24940 -26080 -28884 -37386 -37787 -41504 -41839 -44530 -47898 -53856 -55870 -55876 -59856 -63213 -78071 -83219 -92076 -95065 -96317 -100652 -118605 -121266 -121334 -123142 -125536 -139427 -141148 -141408 -141881 -147494 -148542 -153648 -154205 -161035 -166424 -168287 -177490 -179191 -182147 -186831 -188405 -189613 -196684 -207976 -217575 -217883 -218706 -219892 -220788 -224332 -226847 -229686 -232878 -236417 -241507 -242743 -248640 -256596 -260684 -262321 -263849 -266002 -267155 -269700 -274117 -276522 -278924 -288581 -292736 -298434 -316111 -319855 -320863 -321787 -325274 -341185 -341997 -355803 -357332 -363222 -363838 -367220 -368032 -371760 -373139 -373702 -378210 -386331 -388433 -395045 -403990 -405171 -405807 -413069 -413305 -415134 -420708 -421066 -422578 -427820 -42859…

Example 3:

Input: 14 -694349 -718749 -852400 -373917 -962293 -298601 -40788 -300886 -553044 -756951 -840441 -697345 -386010 -43879
Output: -40788 -43879 -298601 -300886 -373917 -386010 -553044 -694349 -697345 -718749 -756951 -840441 -852400 -962293

Constraints:

1 <= n <= 352; -1000000 <= a[i],x <= 1000.

Loading...
Test Cases:No test cases
No test cases available.