CT22051

The Descending Order of the Crystal weights

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the kelp forests of Tangledeep, Blythe the surveyor keeps careful count of the weights. Compute the guild dues owed, 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 <= 759; -1000000000 <= a[i],x <= 1000000000.

Example 1:

Input: 651 -864197434 194193190 -432898136 -907551436 415873954 -251513667 306770217 931123873 368325258 376132550 126217319 422724768 486348426 323687561 -499821606 404767857 590167347 688943648 121228464 -246775143 -472902954 138910029 -841141017 606822086 -838716518 -752031953 -506184155 739411494 -949017984 583932663 -407900710 145563285 -535824974 -900578860 561218120 45728618 108210677 -457480797 631756884 -681681353 927332502 501204476 -569253154 676405248 -712111688 752873766 65868424 811650655 -132278669 550289556 464071956 -691074212 -532003096 -555793930 263756017 -826221565 -918807313 939258103 143486880 964012495 305614018 -264605837 -360546005 -704675510 -436284151 764686822 35123172 -845949140 513028939 -422263167 984529988 917016115 -353040093 561328579 441144230 938488695 6975161…
Output: 997981397 995266871 985264204 984529988 981551747 979042730 972304509 967627267 964012495 959812643 957330883 951780482 944915842 939258103 938488695 938000855 935878462 931123873 930926457 928489000 927928747 927332502 920605216 917016115 916854748 915302238 907958039 904512180 902833586 892408314 888420464 885133959 879692182 877808839 877806382 875885526 868417003 866192567 862055230 858142486 858135333 855157754 854294799 853897565 850672375 850488454 850000032 849535970 846793718 839984064 838576823 838215046 837922911 833855571 832475187 826188172 822927537 821446892 818920259 812213905 811650655 805474139 804117744 799501011 796405250 784741847 764686822 764360559 762222266 759303006 756987748 755723916 755380490 752873766 743203967 743198018 739411494 736628761 735883394 734972431 …

Example 2:

Input: 348 -271703083 859785657 -79481213 106612840 460731978 34270214 491035933 560856182 -212164800 -516916646 -941680103 -211316605 -762545029 668515207 1170439 -348156093 171960570 -461577848 821631476 -292407870 -623851297 -645065029 -614950399 -146540919 134170073 895715529 68127954 -472989805 -726841244 -331612604 -297004538 -424432925 686724141 906038471 -41423012 -497137954 881853340 723999077 449133419 608199798 -20657242 -279116725 -793950934 -91593649 114709037 42580470 442241491 664414711 -636317256 -605390755 960645064 -525997634 984563588 614099975 921408653 15313661 993085501 180154034 -187343435 -290673129 572149176 -269803303 782057359 -509545846 -730112009 -5687915 834383303 -452331262 -131839949 446203356 -897561591 -472516738 -107848432 -929392244 679151253 -83153584 10280187…
Output: 999618023 993085501 984563588 983686449 965612520 960729629 960645064 951627331 945889320 944902272 939860720 934716992 933863424 930459022 921408653 917101328 908446413 906038471 901559632 896802129 895715529 895185211 888310964 881853340 879980997 878466544 877966891 871040920 859785657 859528637 857931281 853084271 843943637 836344133 834383303 825244201 821631476 814351834 792510474 791933780 782057359 774422702 773209557 760837595 750624426 750151034 727304627 723999077 722517443 708926265 703480170 686724141 685685004 679151253 674605948 673113491 668515207 664414711 661530227 658717272 634319069 617288028 614099975 614037803 613236739 611153636 608199798 600915242 587399629 587333904 582042931 572149176 560856182 559879375 558639831 557482438 546134367 521836736 491035933 489277767 …

Example 3:

Input: 154 -667877181 750702265 377062536 762778364 -331386061 381931403 300837773 12861901 -330842451 913049388 -728160831 -946040582 -999756689 -267852115 232504252 59141890 -392288753 744971246 858307376 321874336 532357150 -774081871 464495567 159953602 638961303 712689949 767199793 -369368217 -183534505 65922011 -389482154 -749143006 273810333 400076054 -635759552 131771647 -247337475 -800397659 -111218881 749701493 -879644305 988963916 -902320832 686812735 226112927 -419511902 -903210664 -59779197 228435080 225895594 261883365 -485843241 849593558 541711585 876521418 221631375 -278415729 770224684 896347053 537079193 651049358 435249797 -390282992 323789119 189644479 -179437546 -771907428 390116682 290138310 897758169 985645111 -61956310 629960990 -436295502 10689207 -947404820 -709749438 -…
Output: 988963916 985645111 977246631 943542885 913049388 897758169 896347053 876521418 875745995 871650802 858307376 849593558 843439756 842665195 811130146 802525355 798679854 776603533 770224684 767199793 762778364 750702265 749701493 744971246 712689949 695356883 693617311 686812735 651049358 648494768 641607967 638961303 636660250 629960990 598528502 575219487 541711585 537079193 532357150 486907672 479183748 465065747 464495567 458173405 447970378 440955921 437960535 435861484 435249797 400459170 400076054 390116682 381931403 377062536 350392294 323789119 321874336 317373379 314627353 311966227 300837773 290138310 273810333 261883365 232504252 228435080 226112927 225895594 221631375 199508899 189644479 159953602 134264447 131771647 124022550 86691662 65922011 59141890 50818895 30768081 24027…

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Descending Order of the Crystal weights - EASY Coding Problem | CodeTikki