CT22474

The Two-Ledger Merge of the Roving weights

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Iris inherited the workshop at the ember mines of Cindercrag along with its curious bookkeeping system for weights. Time to make sense of it. 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 <= 635; -1000000000 <= a[i],x <= 1000.

Example 1:

Input: 422 313 -997726782 -997500671 -997215831 -995698200 -994757185 -994131733 -989145975 -984401808 -980725405 -979708032 -973881043 -973177893 -960204117 -953258249 -949688977 -947497898 -944779411 -943620216 -937560484 -936059186 -935628425 -933269065 -931336052 -931191752 -929586201 -929361555 -925608275 -922640477 -922373666 -922140701 -921473516 -919827801 -918236339 -917323848 -916941652 -915962238 -915434648 -915171497 -913003469 -909619062 -908103776 -897730613 -895906570 -893475952 -892249155 -891475052 -891286122 -890890837 -890792241 -887684943 -886424941 -884466716 -883160148 -882769004 -876301748 -874517871 -873506512 -865200747 -864164116 -861640572 -857982926 -857225431 -855423678 -850957376 -850929308 -850877414 -848377912 -843997669 -836254075 -835829279 -832984291 -824035106 …
Output: -998504286 -998410281 -998047587 -997726782 -997500671 -997215831 -995698200 -994757185 -994165807 -994131733 -989241809 -989145975 -987594710 -986033153 -985743497 -984401808 -982270672 -980725405 -980657145 -979708032 -978458207 -973881043 -973485166 -973177893 -971651426 -964114279 -962229709 -960204117 -960130839 -957491825 -956972816 -956212347 -955726774 -955143415 -954727422 -953258249 -952424662 -949688977 -947497898 -945537372 -945351462 -944779411 -943620216 -940959149 -940238224 -937560484 -936059186 -935628425 -933269065 -932209644 -931336052 -931191752 -929586201 -929361555 -926607804 -926520973 -926319451 -925740876 -925608275 -922640477 -922373666 -922140701 -921660795 -921473516 -919827801 -918236339 -917323848 -916941652 -916915697 -915962238 -915434648 -915171497 -9130034…

Example 2:

Input: 324 76 -999412962 -997267810 -988162449 -983216838 -978676193 -978615135 -978158275 -975166662 -974113575 -973114086 -968818632 -968655220 -967930247 -966927103 -965940221 -965428433 -963275308 -962996765 -961675966 -959139919 -955726412 -946133481 -945721313 -939830768 -936170037 -936104517 -934418663 -934412563 -933537937 -930807748 -927068657 -918340996 -917726183 -914287795 -911702194 -910287631 -906630771 -904312582 -898671190 -894828797 -890732191 -883033210 -880486764 -876280657 -875963572 -875412785 -872320060 -870584955 -870481595 -867847300 -855958876 -855576237 -855165320 -848719390 -847705751 -846775989 -844135497 -842733969 -842710672 -836436453 -835588090 -833740796 -832812716 -832370654 -831422278 -823233360 -822667288 -821376348 -819376247 -817413070 -817219001 -816685309 -…
Output: -999412962 -997267810 -993056407 -991973349 -988267894 -988162449 -983216838 -978676193 -978615135 -978158275 -975166662 -974113575 -973114086 -968818632 -968655220 -967930247 -966927103 -965940221 -965428433 -964923138 -963275308 -962996765 -961675966 -959139919 -955726412 -953657711 -946133481 -945721313 -939830768 -936170037 -936104517 -934418663 -934412563 -933537937 -932358722 -930807748 -927068657 -918340996 -917726183 -914287795 -911702194 -910287631 -906630771 -904312582 -902347318 -898671190 -898031085 -894828797 -890732191 -885891838 -883033210 -880486764 -876280657 -875963572 -875412785 -872320060 -870584955 -870481595 -867847300 -867176511 -864758976 -859548873 -855958876 -855576237 -855165320 -854757389 -849772617 -848719390 -847705751 -846775989 -844135497 -842733969 -8427106…

Example 3:

Input: 578 552 -999827571 -999745332 -999423710 -996961239 -995071326 -993880884 -993375555 -990191136 -987780003 -983307158 -983215866 -982084088 -981033021 -980576133 -974477565 -968877889 -966870408 -964353522 -962001986 -961012393 -958620848 -958358911 -955307106 -955020371 -952697777 -951756080 -950814176 -949446521 -946257609 -946190186 -945817537 -945774346 -940753536 -939928236 -939023433 -936276428 -931828985 -931142059 -927788168 -927734636 -927162698 -926491862 -925276097 -924544534 -922525930 -920567697 -919717212 -918678126 -915800503 -912597034 -909315561 -908181884 -905831330 -903668791 -898644528 -895841355 -894783404 -885811425 -885031938 -884900246 -884754434 -884197504 -882564035 -878369832 -876241004 -874469760 -871942319 -871316918 -868254007 -866625131 -864713281 -859876620 …
Output: -999827571 -999745332 -999666577 -999423710 -996961239 -996632992 -995706812 -995071326 -993880884 -993728081 -993375555 -991447704 -990191136 -989786271 -988485801 -987780003 -985786997 -983307158 -983215866 -983152075 -982084088 -981541247 -981033021 -980576133 -979702539 -978593820 -978024458 -975480328 -975229195 -975089865 -974882886 -974477565 -973807250 -973660362 -972799486 -970103742 -968877889 -967464684 -966870408 -964353522 -962449884 -962345234 -962001986 -961774347 -961772805 -961012393 -960683201 -960677313 -959838071 -958620848 -958358911 -955307106 -955020371 -952697777 -952507957 -951820738 -951808902 -951756080 -950814176 -950158863 -949446521 -947654624 -946257609 -946190186 -945817537 -945803375 -945774346 -945668908 -944273731 -942795258 -942500194 -940753536 -9399282…

Constraints:

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

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