CT26890

The Descending Order Beneath Silverfin

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the herring shoals of Silverfin, Ivo the ledger master keeps careful count of the vials. Prepare the winter inventory, every figure matters. 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 <= 745; -1000000 <= a[i],x <= 1000000.

Example 1:

Input: 400 -746316 -963300 435802 623800 987802 -343783 -465249 -339870 -960883 -582555 -434415 726116 -945924 -897994 -709432 869597 513954 559184 -517992 187359 489498 -123262 -212198 920571 354863 283790 -955513 247932 -133919 119949 -583636 -351632 -632263 -827640 691726 -683964 473918 -614675 259062 -432047 -15382 -916304 641194 -987527 334966 -444826 775657 453339 -394564 -537639 -124907 -614658 567387 133199 951125 -111847 707136 -466812 202376 508427 158404 -558102 -526203 -666361 741131 532961 641522 -743996 -237602 -420403 -140166 -258247 -25769 189192 -891733 -448199 968775 -156622 468527 -512509 543711 -588307 948187 -382588 839469 -861553 -674304 -326730 654560 -63293 975420 -298534 -482383 -37797 651307 -533924 -503997 532192 62239 -751647 410969 88885 -145257 -237139 -519509 230365…
Output: 994447 991434 987802 984034 977096 975420 968775 967545 965964 964448 951125 948187 944153 943513 942894 935243 925769 921549 920571 919987 900680 894111 890328 880693 876736 875486 873079 871972 869597 853482 843222 839469 835225 832082 828691 826130 824101 820499 810554 809820 807439 791767 788694 786766 775657 772834 766273 766005 758330 751427 751197 741131 730912 727184 726116 715774 707136 705486 701796 694814 691726 682985 682378 673012 671634 670244 666442 665581 654963 654560 651307 647800 641522 641194 631166 630705 629386 623800 610776 606822 593053 591540 589683 587520 583323 582485 580488 570608 567387 564987 559668 559559 559184 556564 556297 553315 551279 546084 543711 542774 537446 532961 532281 532192 531329 530761 513954 510212 508427 507729 501984 500333 494277 494048 48…

Example 2:

Input: 363 300912 47231 495977 535754 3916 -692274 -908362 130619 -937831 789708 133476 66589 207120 -637155 -559385 -445037 735528 -352624 -112977 38949 -702384 863007 416496 587070 14372 572789 773402 391530 893997 -332397 -140041 590050 -5475 597929 677758 563086 246404 -688894 840376 751676 -296128 779442 516115 371143 856167 146602 -805191 -198994 -601133 -996700 -696252 -36444 -382762 -676846 909900 -241829 -142701 -111702 -779287 -441121 -100802 801872 -570231 275056 -768257 -376058 -671470 363147 659982 -643444 -112544 381522 -881711 682385 -980617 -211247 -508891 93423 70562 -566453 -965579 -647614 -263890 978551 -971120 -947408 241558 -644250 249284 70722 -986383 -566552 882662 994870 240936 849589 126632 594616 -334990 472162 -583281 74920 -739538 493660 -365468 271000 652528 -971627 -…
Output: 996816 994870 990438 978551 974405 973296 965514 958409 942484 927145 920440 916890 909900 908133 905226 903689 893997 885120 882662 880554 868328 863007 862832 856167 849589 848978 843120 840376 823948 812263 801872 801533 801174 789708 784008 782567 781595 779442 773402 771743 762369 759103 751676 748163 745561 735528 718306 715699 696382 690334 687643 682385 677758 661529 659982 654075 652528 641745 638513 637895 617795 610503 597929 594616 590050 587070 578796 574789 572789 563086 562511 553659 535754 522339 521470 516115 499072 498276 495977 493660 492953 472162 443782 431882 421831 417122 416496 405201 397600 391530 391311 381522 378354 377976 375644 371143 370616 363147 340676 337606 331580 325407 324196 317548 309941 305012 302951 300912 297447 297170 292161 283207 275056 274557 27…

Example 3:

Input: 155 -463393 484705 -682636 430364 -513611 681531 850406 802419 -248446 -587732 -480328 -203267 168033 83380 -767724 279093 948283 -99140 -47617 136840 888920 -930027 885958 229096 119244 932241 -63830 -396211 586086 263427 76289 698615 270756 -444916 -505973 89278 848767 701910 -586903 206763 -802532 -840583 731076 -490075 -436271 219026 -339657 -153793 534531 -10714 -569230 -373888 -763099 -985109 -555043 789989 -564109 -313450 537697 -71043 429335 694203 -753582 751318 -470293 307818 -169554 908313 606253 -550276 -469525 -99231 392408 250989 689375 -96584 380207 -704079 -147573 324788 507434 -74806 -424855 804006 226477 -694791 -877397 -784225 -467076 -69947 246505 -90699 134531 -846800 771753 -715332 679590 694051 -347131 -361588 105474 -74349 -822183 -694927 -587507 369887 -152496 9729…
Output: 972922 948800 948283 940849 932241 908313 888920 885958 857793 850406 848767 847473 804006 802419 797810 789989 771753 753824 751318 736898 731076 701910 698615 694203 694051 689375 681531 679590 650875 606253 586086 568122 537697 534531 507434 502485 497928 484705 475931 463617 430364 429335 399387 392408 380207 369887 357725 347652 325385 324788 307818 279093 274171 273816 270756 263427 250989 246505 229096 226477 219026 213393 206763 168033 161877 156809 140533 139697 136840 134531 119244 105474 105386 89278 83380 76289 75092 -10714 -17771 -30298 -47617 -63830 -69947 -71043 -74349 -74806 -90699 -96584 -99140 -99231 -121628 -147573 -148101 -152496 -153793 -169554 -203267 -248446 -313450 -328337 -339657 -347131 -361588 -367158 -373888 -377540 -396211 -424855 -431901 -436271 -444005 -44487…

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Descending Order Beneath Silverfin - EASY Coding Problem | CodeTikki