CT26047

Lamplighter's Ledger of vials

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the eel marshes of Slitherwick, Lamplighter studies rows of vials entries. One clean number will settle the guild's oldest argument. Task: Two arrays are each sorted non-decreasing. Print one sorted array containing all of their elements. Input format: First line: n and m. Second line: n sorted integers. Third line: m sorted integers. Output format: Print n+m sorted values space-separated. Constraints: 1 <= n <= 280; -1000000 <= a[i],x <= 1000000.

Example 1:

Input: 247 120 -972081 -970528 -970087 -960803 -943416 -937218 -916613 -913428 -912581 -905437 -894630 -883601 -877491 -862447 -852921 -850351 -848820 -848766 -831268 -816312 -808730 -804710 -797255 -783896 -782859 -766700 -765643 -760486 -760075 -756856 -753691 -744781 -738704 -737406 -727601 -716681 -707723 -705751 -686372 -677967 -662722 -651446 -647059 -645443 -643321 -643204 -639995 -619959 -616978 -614890 -612610 -588297 -579821 -566417 -560557 -550351 -544106 -544055 -540124 -536380 -529674 -525895 -521950 -515868 -513379 -494836 -490786 -489594 -473009 -466237 -464686 -462666 -455855 -453079 -449851 -449708 -449155 -431808 -425398 -423393 -423191 -414151 -413538 -408780 -399551 -388863 -378857 -355086 -338765 -320061 -291093 -272926 -269012 -261366 -259234 -253258 -253190 -248836 -248061 …
Output: -980600 -977994 -972081 -970528 -970087 -960803 -951417 -943416 -942500 -939492 -937857 -937255 -937218 -916613 -913428 -912581 -908571 -905437 -904064 -894630 -888268 -886128 -883601 -877491 -862447 -852921 -850351 -848820 -848766 -845264 -832748 -831268 -829501 -816312 -808730 -804710 -804426 -797255 -783896 -782859 -774035 -769873 -766700 -765643 -760878 -760486 -760075 -758221 -756856 -753691 -744781 -738704 -737406 -732451 -727601 -716681 -707723 -705751 -703483 -686372 -677967 -668028 -662722 -661767 -658907 -654787 -651446 -647059 -645443 -643321 -643204 -640759 -639995 -635311 -633699 -626981 -624922 -619959 -616978 -614890 -612610 -603722 -588297 -579821 -579464 -567511 -566417 -560557 -550351 -544106 -544055 -540124 -536380 -529674 -525895 -521950 -516643 -515868 -513379 -499253 …

Example 2:

Input: 1 72 275875 -992732 -956028 -925994 -916618 -868395 -822591 -811331 -801411 -796945 -794603 -792199 -761442 -741601 -721713 -687325 -678763 -619340 -566290 -514050 -475658 -463070 -461025 -439247 -425078 -393852 -377024 -366912 -349118 -325551 -272524 -209857 -209233 -207268 -187869 -173865 -162996 -152731 -122766 -108560 2460 9989 21911 50357 51120 87527 124762 141910 264778 281013 298889 328573 397536 411151 487420 494524 518895 524274 524376 544015 578083 591143 617515 679981 735632 738667 773063 856532 865640 875448 898957 910341 968571
Output: -992732 -956028 -925994 -916618 -868395 -822591 -811331 -801411 -796945 -794603 -792199 -761442 -741601 -721713 -687325 -678763 -619340 -566290 -514050 -475658 -463070 -461025 -439247 -425078 -393852 -377024 -366912 -349118 -325551 -272524 -209857 -209233 -207268 -187869 -173865 -162996 -152731 -122766 -108560 2460 9989 21911 50357 51120 87527 124762 141910 264778 275875 281013 298889 328573 397536 411151 487420 494524 518895 524274 524376 544015 578083 591143 617515 679981 735632 738667 773063 856532 865640 875448 898957 910341 968571

Example 3:

Input: 13 145 -937785 -903371 -809237 -773773 -652505 -537590 -495818 -401341 67792 442276 558201 728011 895274 -999280 -992183 -984068 -967420 -960378 -951869 -924640 -923335 -914394 -896705 -895162 -893916 -874047 -830636 -827623 -816903 -808180 -798771 -796298 -792382 -790855 -766233 -749454 -736143 -734289 -704443 -703437 -701993 -666077 -660703 -653488 -636455 -634596 -631636 -630172 -609475 -603400 -590927 -585661 -548873 -541869 -541652 -519645 -517786 -508641 -469085 -452480 -442115 -422965 -417311 -414475 -408881 -387600 -344344 -344018 -339842 -336505 -306635 -252471 -250512 -240138 -230228 -222487 -196577 -191485 -189128 -186126 -172995 -166347 -150203 -149304 -124296 -122275 -119948 -99199 -64136 -63784 -36812 -2325 63291 114429 117708 137815 149632 180626 180883 186710 248381 248675 …
Output: -999280 -992183 -984068 -967420 -960378 -951869 -937785 -924640 -923335 -914394 -903371 -896705 -895162 -893916 -874047 -830636 -827623 -816903 -809237 -808180 -798771 -796298 -792382 -790855 -773773 -766233 -749454 -736143 -734289 -704443 -703437 -701993 -666077 -660703 -653488 -652505 -636455 -634596 -631636 -630172 -609475 -603400 -590927 -585661 -548873 -541869 -541652 -537590 -519645 -517786 -508641 -495818 -469085 -452480 -442115 -422965 -417311 -414475 -408881 -401341 -387600 -344344 -344018 -339842 -336505 -306635 -252471 -250512 -240138 -230228 -222487 -196577 -191485 -189128 -186126 -172995 -166347 -150203 -149304 -124296 -122275 -119948 -99199 -64136 -63784 -36812 -2325 63291 67792 114429 117708 137815 149632 180626 180883 186710 248381 248675 252839 262512 311572 341815 343664 …

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Lamplighter's Ledger of vials - EASY Coding Problem | CodeTikki