CT26556

The Balmcrest Descending Order

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Every season at the cedar groves of Balmcrest, someone must optimize the storeroom layout. This year the task falls to Jaya, armed only with the ledgers register. 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 <= 920; -1000000000 <= a[i],x <= 1000000.

Example 1:

Input: 373 -282246792 -559728228 -358515238 -971371367 -918083196 -287568802 -685347303 -896215660 -528013055 -310672518 -513793651 -398921905 -702475002 -452268759 -941263296 -885814964 -167808442 -378663733 -959623871 -406552127 -270596404 -489779687 -160160699 -964007036 -6524348 -868185552 -919005419 -675156173 -282152668 -284120369 -206146733 -834271883 -412977589 -243757868 -388508910 -429015935 -135143519 -523095252 -653258484 -966963306 -972939679 -557351741 -787602127 -241425620 -541953509 -49209897 -170159235 -771330684 -22727715 -926227412 -364676630 -87747044 -990154308 -232419688 -678198799 -668713652 -519901626 -808440566 -593735257 -537288253 -927709590 -709440654 -223024183 -534226247 -667940842 -490966127 -683696897 -40797564 -887822471 -632871320 -390099989 -410812026 -914340528…
Output: -3441154 -6524348 -7104703 -7786615 -9328109 -9598226 -13319511 -15354523 -17711153 -18396546 -18690286 -22727715 -23375487 -34081716 -35693482 -38509843 -38549723 -39871439 -40385355 -40797564 -43391268 -45867776 -49209897 -50142459 -56774910 -59540258 -63409925 -67126511 -68280229 -72146658 -74191092 -79173273 -83770298 -87602829 -87747044 -92475742 -92536880 -98102996 -100373628 -101923891 -102649414 -105382467 -113701377 -118210220 -126020327 -126337184 -130023205 -130508930 -131424944 -134536570 -134768756 -135143519 -139402883 -140549220 -140775712 -140831536 -142632792 -150145952 -159050894 -159653082 -160160699 -160279855 -164154721 -167808442 -170159235 -171907888 -172500088 -176430356 -179426946 -181384218 -185239895 -187189013 -188824093 -190427208 -192897820 -194723740 -1952043…

Example 2:

Input: 716 -237162082 -799804557 -608247899 -95703844 -429049560 -748357354 -778164647 -851961852 -379316945 -243405775 -502705207 -588448968 -499921548 -29459910 -891130040 -373771574 -209965715 -357581135 -289775062 -482229021 -257667878 -317425597 -75914337 -314478777 -573134116 -428702879 -191227774 -670405142 -32634572 -362945030 -833318242 -272204550 -493556990 -151529455 -403972887 -202988018 -563448977 -475309299 -902234349 -601243814 -126865237 -666600066 -76680783 -117346197 -1554157 -338009276 -154583802 -472816827 -122755281 -275600191 -416545871 -338882508 -472371908 -250250672 -975197091 -255560534 -820488053 -469436185 -340734804 -452652354 -167226689 -874998823 -444069052 -207034872 -762711970 -549946357 -319513883 -454134418 -138851842 -845739376 -574772999 -250186417 -101832621 …
Output: -1554157 -6328045 -7060888 -7827655 -8279983 -8305657 -9869166 -11050104 -11659407 -13410391 -17354497 -18222862 -22363442 -24380876 -27268745 -28562389 -28635972 -29333431 -29459910 -30221401 -30334823 -31184003 -31213427 -32634572 -33764383 -34115921 -35484446 -38759352 -39097903 -41287819 -43042610 -43497322 -45684280 -48983270 -51167691 -54583889 -54835044 -58540764 -61175678 -63173088 -64329406 -66702867 -68170681 -69371832 -70991737 -71189199 -73425428 -75882700 -75914337 -76352879 -76680783 -79151048 -79290081 -86254494 -88135557 -90363577 -94042386 -94630662 -95703844 -96970026 -97707211 -98503428 -99401532 -99913332 -100137489 -101832621 -102950667 -103428443 -109140927 -110022318 -110456765 -110464712 -111397847 -111553759 -111612266 -112049510 -114495613 -116535458 -116849488 -1…

Example 3:

Input: 634 -864464028 -536321316 -405498761 -835149393 -69679806 -213073789 -318836733 -328078736 -680444749 -241898538 -171697455 -740068 -808947011 -41250976 -427664788 -4622937 -553882544 -512662633 -616004184 -851436832 -566829779 -753620327 -664606005 -915544101 -874093206 -821197931 -458961169 -286780623 -34999624 -307008444 -421696164 -239235625 -370515785 -737933510 -431717581 -214699257 -11849474 -341736785 -55490560 -250030232 -383950223 -902881995 -247928270 -330590805 -206109311 -731212439 -448302747 -427751608 -95393370 -419293034 -109720606 -805005388 -969105009 -19832578 -364702639 -417496586 -821904108 -150925007 -250062890 -423210055 -163455734 -526518492 -539075512 -712106912 -552698755 -232360700 -903113425 -903366855 -145038027 -457023131 -383713144 -722011180 -554315861 -7984…
Output: -740068 -1758469 -4622937 -5084718 -6289369 -8286992 -10438249 -11363532 -11849474 -12386380 -14964209 -16430220 -19832578 -21706009 -24535717 -24618009 -24964038 -26624034 -27009781 -28107959 -31606506 -33294822 -34715974 -34971361 -34999624 -35753595 -41136130 -41250976 -42670136 -43016809 -44371069 -44938684 -46435588 -47304716 -48470646 -55490560 -56190428 -60412808 -60681453 -67359117 -69679806 -71959725 -73060066 -73675636 -76108714 -76782539 -79397745 -87610803 -90462145 -90886363 -92655171 -94239021 -94545708 -95393370 -97600025 -97904573 -100459988 -100682601 -101310449 -104485573 -104670506 -105067173 -105265579 -106432975 -108493746 -109488764 -109720606 -110044909 -115936032 -118451587 -120112507 -123460998 -123734284 -125494826 -125994779 -126451534 -127121833 -130670685 -1327…

Constraints:

1 <= n <= 920; -1000000000 <= a[i],x <= 1000000.

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