CT22872

The Two-Ledger Merge of Leatherwick

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Legend says the vault under the tannery row of Leatherwick opens only for a perfect tally of crates. Tina means to find out. 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 <= 760; -1000000000 <= a[i],x <= 1000000.

Example 1:

Input: 197 295 -999638939 -998494202 -998231309 -997423625 -992725723 -982973334 -979935608 -977544934 -975510833 -975189911 -973046532 -967710551 -966491857 -954689070 -952591624 -947939683 -946460003 -945646833 -938065837 -935920837 -922301895 -894632423 -887809135 -886510670 -879874262 -876636515 -874888568 -868693590 -866857366 -865511558 -864989543 -861950867 -846960620 -845359269 -832903592 -830090300 -829072928 -825019187 -818114173 -811873223 -810801494 -809596796 -807928961 -805867800 -801137815 -793538458 -793018209 -787788035 -776951609 -774832950 -772930692 -767991962 -753848704 -751423517 -748658446 -747673232 -747299846 -737166450 -730011669 -729725749 -725002895 -724446812 -719449750 -713060539 -712157797 -704477234 -698624633 -688844883 -688058027 -678699303 -677812793 -667247563 …
Output: -999638939 -998494202 -998365670 -998231309 -997423625 -992933379 -992725723 -991874675 -990514664 -986074797 -984478225 -983897800 -982973334 -981198921 -979935608 -977544934 -975510833 -975189911 -973796555 -973046532 -972359977 -971643486 -971082389 -970091511 -968922679 -968108505 -967710551 -966491857 -956067709 -955736842 -954689070 -952591624 -949584639 -947939683 -946460003 -945646833 -943770082 -938367530 -938065837 -936754376 -935920837 -933348142 -932044722 -929092710 -925279192 -922412930 -922301895 -921578955 -921336218 -920938024 -914957357 -914248464 -914099839 -910717304 -909206835 -908563438 -906634244 -905996346 -894632423 -889228717 -887809135 -887051933 -886854329 -886510670 -885071613 -883407887 -879874262 -877206910 -876636515 -875799200 -874888568 -868704758 -8686935…

Example 2:

Input: 649 39 -999944818 -991271660 -990249969 -987125504 -986682695 -984473341 -983537970 -981074914 -980185496 -978940425 -978140581 -977086707 -976407435 -974973458 -973297777 -971841351 -971163100 -969840599 -967466179 -966927718 -966297016 -965052561 -958943383 -958555782 -948676330 -945777632 -945651689 -945080537 -943816966 -943702433 -940281997 -940129481 -937985800 -937959761 -937205674 -936076545 -935684073 -934540194 -929988265 -928667268 -927953191 -926467397 -926103171 -925782574 -924213947 -923171139 -913858613 -913582404 -913364639 -912051509 -909783053 -909587921 -909569714 -909506154 -908760093 -906304803 -905144076 -904586501 -904259103 -901247212 -898193527 -897521759 -897246948 -895864860 -895607453 -891252156 -889449190 -889282840 -889189441 -887897613 -883931969 -883474257 -…
Output: -999944818 -991271660 -990249969 -987125504 -986682695 -984473341 -983537970 -981074914 -980185496 -978940425 -978140581 -977086707 -976407435 -974973458 -973297777 -971841351 -971163100 -969840599 -967466179 -967145384 -966927718 -966297016 -965052561 -958943383 -958555782 -948676330 -948529818 -945777632 -945651689 -945080537 -943816966 -943702433 -940281997 -940129481 -937985800 -937959761 -937205674 -936076545 -935684073 -934540194 -929988265 -928667268 -927953191 -926467397 -926103171 -925782574 -924213947 -923171139 -917269229 -913858613 -913582404 -913364639 -912051509 -909783053 -909587921 -909569714 -909506154 -908760093 -906304803 -905144076 -904586501 -904259103 -901247212 -898193527 -897521759 -897246948 -895864860 -895607453 -891252156 -889449190 -889282840 -889189441 -8878976…

Example 3:

Input: 78 480 -972661540 -970334456 -964783295 -947048612 -937769968 -905147266 -874140403 -848716661 -842037254 -780353837 -779165814 -777885224 -771166821 -769956154 -766533506 -765610036 -745985962 -745964972 -734146321 -724157945 -671882748 -649563469 -643488686 -630121405 -608591743 -596158318 -580295480 -555043520 -552555075 -550660402 -536265326 -488720787 -487586131 -486287538 -479340596 -478759911 -465313100 -454314227 -453433351 -450051579 -440468001 -434818038 -417119408 -414971993 -397791690 -371616066 -367241577 -365272526 -340925904 -312317691 -304865403 -304607451 -276181114 -272234591 -252574157 -248113930 -235834574 -217244369 -214165730 -211791982 -210387183 -208526575 -194295999 -190011310 -166198902 -151246138 -120956286 -95264148 -91262302 -89766250 -84380498 -75474669 -63138…
Output: -990582369 -990238490 -990204363 -989289455 -987937275 -984880894 -978742282 -978694960 -977046856 -977041961 -976058922 -973484717 -972661540 -970334456 -969065815 -968412894 -967215474 -966613402 -965549368 -965148508 -964783295 -962917633 -962316344 -959175074 -958918678 -953096627 -950622072 -950178422 -949646068 -947903637 -947048612 -946505836 -944328663 -942558810 -942519373 -942270376 -941473759 -937769968 -937557475 -930301441 -929034292 -923877249 -923672432 -920324584 -918969942 -917777402 -917653475 -915697676 -910417671 -909088931 -907912420 -907327792 -905147266 -901928588 -901041676 -900947326 -898407109 -896866329 -896582775 -893533562 -893415418 -891263253 -888827297 -888048867 -881112513 -881024023 -876862811 -875814331 -874940784 -874748909 -874140403 -873858006 -8724529…

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Two-Ledger Merge of Leatherwick - EASY Coding Problem | CodeTikki