CT24506

Quin and the Caramel ledgers

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The harbor bell rings at the ink district of Scriptoria; Quin weighs the day's ledgers manifests and starts the calculations. 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 <= 762; 0 <= a[i],x <= 1000000000.

Example 1:

Input: 225 569 5127825 7814384 9809177 10031408 17425954 19365179 20781160 22317012 24520060 24875326 35687411 39773719 39838802 49963912 55701042 69129883 70105575 70641922 74119836 81446364 87873606 94550501 111453334 120627829 125494556 126985493 133381984 142017799 146067455 167522098 170428507 172020584 174372294 185032422 187850037 188732912 190284153 194184514 194846182 195771130 197582259 204567581 214129941 216263675 219849882 229073917 232720074 233212182 235875837 239804533 244779608 246808203 249875994 260922498 261182472 264188200 267807305 269093774 277580673 278613486 279315924 284689006 285708741 287737719 294030120 294832451 294881866 333241119 334876875 345705551 346310872 346849172 350359905 357418585 360230270 360634634 361019562 361064579 361801365 366058454 369743423 3722395…
Output: 2327359 3564236 3634063 5127825 5869982 7249131 7814384 9809177 10031408 10053342 10091798 10862833 11682677 12248611 15099968 15875565 17181947 17425954 18011011 18241279 19365179 19410968 20781160 21860784 22317012 23029194 24393319 24520060 24875326 25033220 25718282 26494548 26596968 32441277 34671175 35687411 36092522 36585808 39773719 39838802 40239595 40695097 44756011 45949186 46432626 47526023 49624001 49963912 50549839 50703564 51167219 51644226 54292562 55701042 55986415 56721903 57553652 59478805 60584657 66359624 67631329 69129883 70105575 70385742 70641922 70728522 70736193 74119836 74848216 75153969 75503353 79878272 80085638 80469357 80578604 81446364 81918740 82202327 86055149 87873606 88162414 88762054 88932985 89121301 89161487 90011417 93792306 94146591 94550501 9602483…

Example 2:

Input: 420 94 380963 2582766 2648525 5240337 7646040 10210512 10766481 11120871 13602869 15467569 15813524 19207226 21342093 22571977 23763333 28439188 28493910 28941225 29534862 30924655 39791299 40616307 41633893 42701152 45330132 46603861 47336158 48522730 49994499 53335343 53922816 57530273 57788321 58778225 59614078 59831103 61371845 61880258 62467090 67784386 70270262 72264640 72868716 77496916 78958425 79197882 83984895 84714679 84790557 85217852 86579053 88564568 93387667 93581275 96003699 97648923 98620037 100018194 108827135 110418693 110537325 110984618 113139119 113349962 119778874 123351323 125189209 127970398 129826243 130915175 131084451 134521197 134733956 135365949 135408960 136670419 137322545 138980554 144339686 146454233 151021341 155231383 155330906 157997253 162325063 165073…
Output: 380963 2582766 2648525 4239249 5240337 5887264 7646040 10210512 10766481 11120871 13602869 15467569 15813524 19207226 21342093 22571977 23763333 26921808 28439188 28493910 28941225 29534862 30924655 34674702 39791299 40616307 41633893 42701152 45330132 45389206 46603861 47336158 48522730 49448059 49994499 52608339 53335343 53922816 57530273 57788321 58778225 59614078 59831103 61371845 61775041 61880258 62467090 67784386 70270262 72264640 72868716 75518012 77496916 78958425 79197882 83984895 84714679 84790557 84887937 85217852 86579053 88564568 91208579 93387667 93581275 96003699 97648923 98620037 100018194 108827135 110418693 110537325 110984618 113139119 113349962 119778874 123351323 125189209 127970398 129826243 130915175 131084451 134521197 134733956 135365949 135408960 136670419 137322…

Example 3:

Input: 32 151 15426484 109990090 130332123 162893818 192410502 241919578 242082607 244598517 266437415 287040963 307726868 334470482 364467306 374402090 407254504 437020102 441715466 447182915 454651760 509277326 542784810 636013612 637245921 651963349 655661378 728397976 755046716 801684579 836024008 848305309 970945510 972258222 1188645 7734799 14928599 32978388 58785745 61064171 63530297 64414031 88861060 101805637 104530770 111136134 113528801 115362314 116397680 121547040 121692154 122221779 128062975 133975316 138009302 143378097 148197530 161761353 174948414 180067136 182080860 194023359 195510682 205358904 213490833 214115668 214880743 219002968 227434834 228934558 242741407 243199596 249019515 252571843 253472866 253826603 256985068 261699883 277038282 284658720 286855109 305221828 31153…
Output: 1188645 7734799 14928599 15426484 32978388 58785745 61064171 63530297 64414031 88861060 101805637 104530770 109990090 111136134 113528801 115362314 116397680 121547040 121692154 122221779 128062975 130332123 133975316 138009302 143378097 148197530 161761353 162893818 174948414 180067136 182080860 192410502 194023359 195510682 205358904 213490833 214115668 214880743 219002968 227434834 228934558 241919578 242082607 242741407 243199596 244598517 249019515 252571843 253472866 253826603 256985068 261699883 266437415 277038282 284658720 286855109 287040963 305221828 307726868 311534112 326594651 332668486 334470482 336042648 338016619 344720061 345003224 358255377 360620319 364467306 374402090 379481073 383452515 384602821 388993243 402061800 403101585 407254504 414378025 415585736 419946790 42…

Constraints:

1 <= n <= 762; 0 <= a[i],x <= 1000000000.

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