CT22812

The crates Descending Order Puzzle

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Legend says the vault under the steppe camp of Horselord Plains opens only for a perfect tally of crates. Tanya means to find out. 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 <= 477; -1000000 <= a[i],x <= 1000000000.

Example 1:

Input: 356 292622042 527564339 419942169 557875011 883711008 13735220 210048742 491683015 197122274 363588833 239684800 400629107 16458483 133653882 232423003 964526021 489416021 996955765 525477935 408655268 485040157 39897847 838639266 669048894 679529186 485562627 417403820 243175336 545725527 21834903 150569467 920483754 436334495 154170479 667367528 88177924 543986501 509123356 920617935 371399619 617445104 443401324 259224388 178610024 262441135 788012125 282232631 708669097 827157551 486318075 605415761 873454157 319513500 901458156 259394720 275557569 83043372 838922506 110327308 310755448 570287758 657865123 944359812 350186499 819817280 720241591 745638251 530497540 193281587 123970840 423535319 751336858 921927290 832766288 154880271 944256748 597946997 733786475 786983252 831281940 17…
Output: 999256898 997201713 996955765 995919641 993224394 987098280 986535159 983719041 981977939 976921301 975069920 974937126 973015797 965324466 964526021 964054453 958943968 958654592 951309563 950078988 948969107 948681802 945656329 944545377 944359812 944256748 933576112 930170619 928575080 921927290 920617935 920483754 916353072 915873348 913052566 906949699 906200577 901458156 896240919 894579790 893249792 883711008 882637262 878565833 877803057 873454157 873302488 873219735 868290502 866215699 862167003 860163619 858669419 850791719 847171634 846395207 839785950 838922506 838639266 838546100 832766288 831281940 827157551 825270551 821509474 819817280 819122644 816022614 804214504 797311280 789183915 788012125 786983252 784986635 782564172 771207328 766883216 759907192 758429838 757124035 …

Example 2:

Input: 195 108186637 460333271 187442926 68934172 237900503 486537036 947182566 331533138 763331979 204489616 286903375 707170395 948793962 737384393 117947465 324933594 901378248 721915377 563642921 695257768 83778689 180400300 85220217 152789548 65397143 166159868 304215449 640089011 73389430 717838048 182203724 952068596 232926404 110653544 464606852 264634910 679799093 839724097 379430668 46340368 254574650 675454716 268439453 202329722 97921191 503970179 42306706 356876050 937056935 134918925 335920597 698237957 360043047 903309808 162211162 263293422 948763060 618793478 590929920 517097314 982087976 958275355 862579161 511026813 308656296 467490995 289948333 387575122 162698057 393205435 490276622 379404077 780996838 565643880 78962081 110528537 50622394 423322665 818978137 218544310 362995…
Output: 986105679 984572253 982087976 977266802 958275355 952068596 950485251 949306765 948793962 948763060 947612946 947182566 946379524 938966339 937056935 936183952 927268829 918070681 915518998 914444872 912484865 904265263 903309808 901378248 901128793 892606154 875124927 863919316 862579161 839724097 818978137 795069953 788745778 780996838 763331979 755243791 742255070 737384393 730706215 730485121 728555464 723054101 721915377 717838048 714812688 714130301 708268999 707170395 705177317 698237957 695257768 694046700 684570828 679799093 675454716 658427935 646261642 640089011 636239158 635308682 621143532 618793478 590929920 584503516 582824319 578023204 571013446 569610615 565643880 563642921 562268264 560386667 559837290 555648152 548261482 530428619 520526575 517097314 511026813 510195297 …

Example 3:

Input: 55 788967856 642265936 75920845 147719257 590035981 861583183 779753544 77390800 98126124 242105521 406569227 271632008 280220124 229147821 859032103 240418363 111101484 861996371 258121233 718151804 340660301 555271039 322819530 227707336 747005726 565851803 100620382 541453413 911636821 847264662 567962992 615126081 734684313 603660125 515368046 317736240 887248064 550334051 160547683 486811797 869147641 865955928 290009588 767085010 724701533 429481781 715048126 8726540 957288761 461369310 46764048 788621807 546054068 621080239 457854947
Output: 957288761 911636821 887248064 869147641 865955928 861996371 861583183 859032103 847264662 788967856 788621807 779753544 767085010 747005726 734684313 724701533 718151804 715048126 642265936 621080239 615126081 603660125 590035981 567962992 565851803 555271039 550334051 546054068 541453413 515368046 486811797 461369310 457854947 429481781 406569227 340660301 322819530 317736240 290009588 280220124 271632008 258121233 242105521 240418363 229147821 227707336 160547683 147719257 111101484 100620382 98126124 77390800 75920845 46764048 8726540

Constraints:

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

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