CT23962

Sarla Counts the ledgers

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

In the galleon yard of Masthead, Sarla the log keeper keeps careful count of the ledgers. Schedule the next expedition, every figure matters. 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 <= 366; 0 <= a[i],x <= 1000000000.

Example 1:

Input: 304 168 4398810 13337032 13687577 14568914 19813129 22013619 23965832 25457104 25534300 26218836 30948536 40893366 41716551 41847286 48307242 49147290 51104627 53781042 54833592 56738696 67262806 70814391 74843058 78285343 82274012 82434820 89327569 89447658 92874882 100959531 102337057 103518863 103933634 103996766 107466932 107817258 109812255 110626530 111192960 117328906 117649916 122662290 129244502 129273320 129389116 130847263 131534684 132232999 132425778 136649810 137489621 141015541 143051610 144216813 147570459 155617813 163118872 168960250 169934931 170178392 170632654 173696908 177085671 177987589 183398039 185160522 204086084 210493843 210623330 211594548 216871810 223809704 226455140 236443869 237421279 238137293 241576095 248487097 251262124 251518355 259424147 260247239 26…
Output: 4398810 6232954 12377694 13337032 13687577 14568914 17908537 18658806 19813129 22013619 22083567 23965832 25457104 25534300 26055426 26218836 30948536 40893366 41524987 41716551 41847286 42395073 46636132 48307242 49147290 49340452 50848117 51104627 53781042 53933322 54833592 56738696 63161121 64140764 64715901 65598323 67262806 67892989 70814391 73815760 74843058 77048150 77116454 78285343 82274012 82434820 85310236 89327569 89447658 92874882 100959531 102337057 103518863 103933634 103996766 107466932 107817258 109812255 110626530 111192960 117328906 117649916 122662290 125621582 129244502 129273320 129389116 130847263 131534684 132232999 132425778 135542820 136649810 137489621 141015541 143051610 144216813 144909510 147570459 155617813 159908762 161015870 162824808 163118872 168960250 16…

Example 2:

Input: 18 110 10136478 30400453 125684854 140515342 269142553 276708665 379945249 449974691 465724464 558091622 650423630 708054160 713860812 717992617 749461193 750320224 914450452 921931325 22765482 31902986 40262883 54480122 58394923 70084281 70763650 112367826 124800965 126305400 130001001 149234477 165790915 170835559 172947369 178634721 185857122 186753164 203926062 215616409 223030866 232502434 242839199 253980195 254905387 260804688 261302230 286294576 289647929 297425824 306343473 309358165 322858521 342374751 342991600 345193919 345618209 353663319 356733574 368124354 370825363 388418046 392415901 403253864 438639743 438694327 441872859 452164954 456530181 471243413 479267871 480957393 483670784 491182571 492081934 495424475 497068696 500672090 501159917 512089652 518633242 525178970 52…
Output: 10136478 22765482 30400453 31902986 40262883 54480122 58394923 70084281 70763650 112367826 124800965 125684854 126305400 130001001 140515342 149234477 165790915 170835559 172947369 178634721 185857122 186753164 203926062 215616409 223030866 232502434 242839199 253980195 254905387 260804688 261302230 269142553 276708665 286294576 289647929 297425824 306343473 309358165 322858521 342374751 342991600 345193919 345618209 353663319 356733574 368124354 370825363 379945249 388418046 392415901 403253864 438639743 438694327 441872859 449974691 452164954 456530181 465724464 471243413 479267871 480957393 483670784 491182571 492081934 495424475 497068696 500672090 501159917 512089652 518633242 525178970 525616627 527913278 532122347 540654032 547735216 558091622 568298177 581354667 597133630 606231950…

Example 3:

Input: 252 145 347263 2524125 2806756 4146355 7620687 9735817 10558351 13634936 30527571 32629337 34861918 34879420 38637744 40670849 52400560 54409191 60368360 63636300 65161895 74259425 75913515 78758405 83135060 92014499 92519150 94612113 94945723 98228285 100559584 102792831 106710382 107080888 107176665 107269704 107453485 114941491 114988105 115019199 116567727 134477866 140499982 146844188 152371667 155387385 168184071 169920665 173175118 177485359 184898559 185853686 186956955 189211710 190250995 200290188 201720122 202840287 203338853 215879569 218826309 220961365 222757290 224480638 227910218 234049318 241290748 245025338 249533760 252688715 255573021 260704724 267637262 269376251 271232445 273075801 273209647 275991567 284209802 285834332 288646013 289318158 304923510 305151351 3111916…
Output: 347263 2524125 2806756 4146355 7620687 9735817 10115524 10226463 10558351 13634936 28239847 30527571 31978961 32629337 34861918 34879420 36328899 38637744 40670849 52400560 54409191 60024014 60368360 63636300 65161895 71146891 74259425 75913515 78062458 78758405 83135060 88871937 92014499 92519150 94612113 94945723 98228285 100533579 100559584 102792831 103706330 106710382 106895612 107080888 107176665 107269704 107453485 112345154 114941491 114988105 115019199 116567727 127016375 133120429 134477866 135859904 140499982 146844188 148405667 148774671 152371667 153564457 155387385 158779395 160705211 161585002 168184071 169125305 169244915 169920665 173175118 177485359 182984473 184898559 185853686 186956955 188956714 189211710 190250995 193014209 194459687 196095048 199848193 200290188 2017…

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Sarla Counts the ledgers - EASY Coding Problem | CodeTikki