CT28020

Theo's Hidden Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Every season at the savanna camp of Amberplain, someone must settle the inheritance fairly. This year the task falls to Theo, armed only with the crates register. 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 <= 347; -1000000000 <= a[i],x <= 1000.

Example 1:

Input: 64 21 -921252156 -917600674 -909857792 -899761586 -884221881 -855188441 -841748935 -839402204 -823452204 -810156218 -806804267 -784755423 -782266393 -774159709 -766905562 -757635957 -745951822 -738977789 -726343648 -708783057 -704782896 -697777779 -660304197 -650969655 -631462499 -628668770 -626147797 -623167699 -610950887 -551291728 -527923913 -522800143 -491303165 -486668910 -467846519 -448206865 -434243532 -383196625 -376081804 -366018592 -337051974 -329310687 -324726340 -317632057 -310815099 -308398367 -305490720 -296295223 -245597445 -223466891 -190454666 -189375097 -186468124 -173552177 -163969072 -131499847 -130133832 -107504370 -100476149 -85170151 -82782036 -76541971 -41283829 -9378181 -892038711 -838399029 -833606353 -762283234 -711166842 -655859349 -511267303 -498942233 -4770944…
Output: -921252156 -917600674 -909857792 -899761586 -892038711 -884221881 -855188441 -841748935 -839402204 -838399029 -833606353 -823452204 -810156218 -806804267 -784755423 -782266393 -774159709 -766905562 -762283234 -757635957 -745951822 -738977789 -726343648 -711166842 -708783057 -704782896 -697777779 -660304197 -655859349 -650969655 -631462499 -628668770 -626147797 -623167699 -610950887 -551291728 -527923913 -522800143 -511267303 -498942233 -491303165 -486668910 -477094404 -475222081 -467846519 -448206865 -434243532 -425906028 -386585645 -383196625 -376081804 -366018592 -337051974 -329310687 -324726340 -317632057 -310815099 -308398367 -305490720 -296295223 -280956800 -265113387 -245597445 -223466891 -190454666 -189375097 -187558122 -186468124 -175740664 -173552177 -163969072 -134413861 -1314998…

Example 2:

Input: 43 58 -934502601 -924657438 -906963887 -903289356 -877224575 -852182672 -822351718 -820597684 -802679160 -794901334 -773178423 -768042479 -727408586 -726188036 -720234373 -692090768 -653866599 -625367445 -599496532 -597173172 -575934709 -418717648 -380588222 -356692385 -348287053 -335794233 -301754801 -277142028 -270145691 -263822112 -258868857 -242885094 -219187996 -185226056 -177328704 -94090904 -86359553 -78610217 -68953795 -66105639 -63255895 -35215187 -25328747 -988985281 -981753293 -974222631 -973955887 -937597363 -937322675 -936438037 -913220238 -909719654 -893791778 -887797932 -857088086 -840087659 -831083837 -825425900 -806163880 -789564210 -774609128 -773821457 -773155081 -741619383 -740727935 -722924877 -685681105 -651675072 -647244086 -644505158 -627409663 -605338487 -592650697…
Output: -988985281 -981753293 -974222631 -973955887 -937597363 -937322675 -936438037 -934502601 -924657438 -913220238 -909719654 -906963887 -903289356 -893791778 -887797932 -877224575 -857088086 -852182672 -840087659 -831083837 -825425900 -822351718 -820597684 -806163880 -802679160 -794901334 -789564210 -774609128 -773821457 -773178423 -773155081 -768042479 -741619383 -740727935 -727408586 -726188036 -722924877 -720234373 -692090768 -685681105 -653866599 -651675072 -647244086 -644505158 -627409663 -625367445 -605338487 -599496532 -597173172 -592650697 -575934709 -571862228 -544568404 -519192875 -503959708 -482410747 -428193040 -418717648 -415876747 -408282347 -407892795 -406929691 -388237449 -380588222 -356692385 -348287053 -335794233 -335002853 -301754801 -296041247 -293540405 -277142028 -2701456…

Example 3:

Input: 264 184 -997094938 -990351815 -989442656 -984788141 -982257701 -971772615 -966105192 -964518931 -956699580 -951628176 -945734231 -942067216 -924490435 -921338584 -916134271 -906204541 -903389735 -901541025 -892834088 -882200804 -873821540 -871104621 -870311417 -865381675 -865288885 -860250681 -858049697 -854230776 -851288107 -849908318 -845504935 -843931899 -839893305 -834710168 -832267167 -830785343 -828366691 -821508630 -819786131 -811031796 -801529953 -798482533 -798307023 -795890836 -786055845 -780306148 -776881774 -774518271 -771453753 -770976185 -769549864 -760688255 -759486216 -757360201 -746894640 -739496565 -732462571 -717777583 -716163437 -715743622 -713236289 -709030413 -706791494 -698991240 -687487632 -684195055 -683332914 -682981931 -680588734 -678673363 -674867784 -672946282 …
Output: -998020257 -997633830 -997094938 -990351815 -989442656 -987806487 -984788141 -982257701 -981372462 -979154855 -971772615 -966555282 -966105192 -964518931 -964407691 -959802737 -956919304 -956699580 -953181000 -951628176 -949873861 -945734231 -943635347 -942067216 -938396155 -930862656 -924490435 -921781378 -921374700 -921338584 -916134271 -914782881 -911832408 -910370070 -906204541 -904616601 -903389735 -901541025 -895024831 -893787457 -893555618 -892834088 -887064740 -882200804 -874098063 -873821540 -871104621 -870311417 -869192851 -868100491 -865381675 -865288885 -860971998 -860250681 -858049697 -854230776 -851288107 -849908318 -845504935 -844148101 -843931899 -842144865 -839893305 -837733907 -834710168 -832267167 -831978071 -830785343 -828366691 -827551753 -827238902 -821508630 -8197861…

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.