QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#234807#2572. Box PackingwaifuSenpai#AC ✓232ms6084kbC++17818b2023-11-01 22:57:142023-11-01 22:57:14

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3532kb

input:

4 1
2 2
4 2
3 4
5 5

output:

3

result:

ok 1 number(s): "3"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

4 2
2 2
4 2
3 4
5 5

output:

4

result:

ok 1 number(s): "4"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

10 2
8 12
15 5
13 19
11 5
2 13
13 12
5 6
8 6
14 2
16 3

output:

7

result:

ok 1 number(s): "7"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

10 2
16 4
2 5
11 16
15 5
6 12
2 1
9 16
9 10
12 11
11 17

output:

8

result:

ok 1 number(s): "8"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3876kb

input:

10 2
1 6
17 9
14 19
11 14
10 17
16 1
6 13
10 13
2 2
9 7

output:

8

result:

ok 1 number(s): "8"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

10 2
4 20
17 11
2 10
18 10
7 14
17 5
16 2
3 16
6 6
9 18

output:

6

result:

ok 1 number(s): "6"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

10 5
2 5
6 18
5 13
8 13
7 10
19 3
14 20
12 5
1 7
18 18

output:

10

result:

ok 1 number(s): "10"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

10 5
2 9
3 1
6 17
12 19
20 15
4 14
14 19
18 15
7 20
20 12

output:

10

result:

ok 1 number(s): "10"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

10 5
10 7
15 2
19 15
10 18
19 17
6 5
11 9
13 3
4 20
11 16

output:

10

result:

ok 1 number(s): "10"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

10 5
4 6
17 17
13 11
17 12
4 3
11 18
20 5
10 9
8 9
4 1

output:

10

result:

ok 1 number(s): "10"

Test #11:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

10 2
7 2
2 6
3 2
4 8
6 3
2 3
5 4
5 2
5 5
3 7

output:

8

result:

ok 1 number(s): "8"

Test #12:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

10 2
7 3
8 4
6 3
8 3
4 3
3 2
5 4
3 1
2 3
8 2

output:

9

result:

ok 1 number(s): "9"

Test #13:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

10 2
9 2
7 2
6 2
4 2
5 3
2 1
4 1
4 1
3 2
8 3

output:

10

result:

ok 1 number(s): "10"

Test #14:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

10 2
1 6
1 5
2 6
1 6
1 3
1 4
2 5
1 5
3 2
2 6

output:

9

result:

ok 1 number(s): "9"

Test #15:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

10 5
2 5
2 4
3 7
4 7
4 4
2 6
2 3
4 5
4 4
2 2

output:

10

result:

ok 1 number(s): "10"

Test #16:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

10 5
2 3
5 1
5 3
5 1
4 2
2 5
3 4
3 1
4 5
2 3

output:

10

result:

ok 1 number(s): "10"

Test #17:

score: 0
Accepted
time: 0ms
memory: 3880kb

input:

10 5
3 7
4 5
2 10
4 8
4 2
4 6
5 4
4 10
2 3
4 9

output:

10

result:

ok 1 number(s): "10"

Test #18:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

10 5
6 5
6 3
3 8
2 5
4 6
7 2
3 8
2 4
5 4
3 7

output:

10

result:

ok 1 number(s): "10"

Test #19:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

1000 10
437760498 660006064
368025948 84055924
88191994 557794711
800558064 13317835
16000490 540324041
683602342 272100213
495605429 907434303
20698497 391720907
614635153 195626707
876579851 632089932
205704570 521726663
637927377 34956570
511512496 860619327
357797349 776617595
516985396 93087938...

output:

446

result:

ok 1 number(s): "446"

Test #20:

score: 0
Accepted
time: 1ms
memory: 3828kb

input:

1000 10
201897216 707885437
329065604 691751457
59491000 880398087
191078267 945267643
276118422 748751545
240641753 601531952
906115715 782127880
666525158 475103782
316812619 483958766
458416914 876594697
790909725 505723751
929713775 719020679
703645455 450400246
134163506 101765908
177891992 905...

output:

448

result:

ok 1 number(s): "448"

Test #21:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

1000 10
237161595 947807840
568482517 949992899
124172378 828571144
469151807 795760032
142364742 821770814
799484023 683910571
547181584 954639830
431531961 725727278
156903163 377179700
591275251 707255115
296354370 655278034
8752199 78822260
25567120 452668094
949154188 743036401
49568646 2689052...

output:

452

result:

ok 1 number(s): "452"

Test #22:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

1000 10
935097274 131559404
699632821 861658824
314601804 646948586
192154914 331175153
391601739 250398725
135333391 167637566
647023086 760694086
230102756 995051324
451601646 388977627
674077900 374921179
515633159 441814679
812219189 112975343
957982843 171592303
373445202 657873840
340130446 53...

output:

427

result:

ok 1 number(s): "427"

Test #23:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

1000 10
791858785 397342061
234928696 881013255
754406135 697080736
202532703 917344066
775089073 363949886
379848526 127711089
448993441 756195785
708169020 792146695
242902593 675136965
471701251 106556859
582200300 246022461
455734688 537147143
310130786 289544765
82758070 553563308
214523976 629...

output:

441

result:

ok 1 number(s): "441"

Test #24:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

1000 10
173860469 574869198
328563788 677085889
649671318 321793764
655280777 327994955
314471255 681004692
622769314 979026816
571599918 458365893
222295255 413582625
997944006 357568434
919481055 292644996
347506557 580127595
188580961 773047827
373394407 770650709
12484474 921246667
713295689 822...

output:

420

result:

ok 1 number(s): "420"

Test #25:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

1000 10
269640614 360482368
640604988 521228059
269806589 428011474
714618490 129512716
831484838 930334058
428520600 482645224
106021006 190316169
153503029 634545715
403375398 115967191
32959668 402727636
301819108 723910813
743321788 231469464
927587520 317506377
206396601 851573423
108191672 902...

output:

451

result:

ok 1 number(s): "451"

Test #26:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

1000 10
462709197 886070360
887088492 824497418
837690724 317754141
973738181 892243878
430566698 256577365
514542637 955512586
737941020 332956077
699694572 610193726
647934061 913119018
128341695 661673441
320513540 720170404
200061014 873115811
407136507 743360070
774049239 850294730
386927137 68...

output:

443

result:

ok 1 number(s): "443"

Test #27:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

1000 30
423645681 870298413
24814514 776366781
698800776 854251805
386981833 655925406
337733537 108097940
798349950 37894749
150420653 754150306
608865349 707298524
936686915 510088474
109751798 122654208
756225437 376701714
655278926 470132018
510540056 333282919
971391340 580217823
127787704 5476...

output:

863

result:

ok 1 number(s): "863"

Test #28:

score: 0
Accepted
time: 1ms
memory: 3888kb

input:

1000 30
292140241 21482906
2902041 219137519
781295568 45321556
206978084 797303277
875975374 477193235
568859511 791794516
683928663 463807421
141518111 641411418
784535065 579867133
214936972 535258430
367275876 815865539
381538578 685171393
505372081 431183554
192587881 991695016
973250840 164656...

output:

867

result:

ok 1 number(s): "867"

Test #29:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

1000 50
672705148 565184689
864830784 404053642
247035097 4492799
614644672 229457335
306580683 281086841
50486650 417505942
714465681 750913957
82858470 276139893
732494972 500818751
159588303 369929755
389198705 873308597
851693525 515071552
662253418 248318889
680741611 416794640
542285557 706575...

output:

989

result:

ok 1 number(s): "989"

Test #30:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

1000 50
415525910 75253844
475506283 883770842
893582687 328446925
131869480 99004517
556536447 406102980
60403842 69898365
795921626 890924122
339872288 229134169
904990844 49742072
806621839 802476466
373100178 578487496
817414591 634646084
174736879 537358650
354978180 381990481
49890696 83172979...

output:

989

result:

ok 1 number(s): "989"

Test #31:

score: 0
Accepted
time: 0ms
memory: 3896kb

input:

1000 50
436843540 911866314
794618024 544597778
318963577 344603949
531745426 526435264
80707030 339261074
391028969 520571559
813478510 296930957
745814135 618877429
848779833 830466692
601587967 957598699
717302369 712137012
529126837 355023199
716782276 630484269
182413760 425361978
62446709 5867...

output:

985

result:

ok 1 number(s): "985"

Test #32:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

1000 50
907261905 920954081
360130973 771656544
257550985 315721122
840769671 307156652
486237674 404912512
347444521 711138427
237414115 446852862
510989347 988022608
503495396 657499331
678020311 339604500
467074147 600262167
503512556 420263571
57841495 702976362
291683790 962593277
467815360 373...

output:

992

result:

ok 1 number(s): "992"

Test #33:

score: 0
Accepted
time: 1ms
memory: 3608kb

input:

1000 50
54445575 192327616
378521877 736461632
37968168 124875312
215459226 80816898
309165511 784643671
112429500 693321430
154169389 611242047
236692908 337285567
820268824 955927429
926291283 345203092
586798647 318330843
184793801 91891074
238427823 311319942
435345631 686641799
758252441 260055...

output:

993

result:

ok 1 number(s): "993"

Test #34:

score: 0
Accepted
time: 0ms
memory: 3892kb

input:

1000 100
978466272 144382720
953422360 132997904
121258963 231234571
371655281 426911022
800614635 181725305
849807162 914174646
628577273 544873913
111091273 366115560
720358900 380003837
89411540 812043274
692507765 78055101
817901817 769812453
994665532 418008884
887419959 157013062
259066793 402...

output:

1000

result:

ok 1 number(s): "1000"

Test #35:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

1000 100
341867497 870202037
992682839 35619169
935442100 93117956
557319621 279243462
782923726 456380906
490448728 490326319
564277811 722556280
898681278 670002862
712140645 138853861
903877994 327036861
657145832 384104714
760279061 534194615
162386887 655189479
12567865 911736156
56672526 95129...

output:

1000

result:

ok 1 number(s): "1000"

Test #36:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

1000 100
267379121 859352225
776405753 931769684
673702804 622985859
40524298 232224024
420495239 42969457
542328017 12486003
635548789 37434341
445451844 925359354
719466493 929090095
317766987 272887639
280459505 859791603
450160451 306509255
712478679 99725225
315409020 604369819
984799595 403526...

output:

1000

result:

ok 1 number(s): "1000"

Test #37:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

1000 100
560564309 796636751
129715371 397549892
156189886 839445893
900010935 612811426
963843769 764777765
432333417 270586799
216433328 658425440
348766911 602846332
768082259 252506186
514395962 826722111
650208276 352419420
189678430 149843668
100251052 441250545
720660021 345717559
589580436 6...

output:

1000

result:

ok 1 number(s): "1000"

Test #38:

score: 0
Accepted
time: 1ms
memory: 3896kb

input:

1000 100
418385455 321691853
385487577 384194159
124055625 322012123
675840298 674660726
747669421 758267447
600460716 144046183
428944146 820480679
190197369 74030391
647877652 137812340
760841422 141381026
5170099 639331563
944676751 699469224
431382228 227053022
637218752 248933386
63491263 85171...

output:

1000

result:

ok 1 number(s): "1000"

Test #39:

score: 0
Accepted
time: 105ms
memory: 4388kb

input:

100000 30
394178704 623068488
33849513 884492173
200644346 999078024
151533852 342212224
745841050 472645213
318245792 244654205
853219313 116318408
62978334 540463617
479687924 882048607
228731190 482539356
915772811 857245387
487582393 920444720
893845779 687483211
244931120 517697782
615423453 46...

output:

16168

result:

ok 1 number(s): "16168"

Test #40:

score: 0
Accepted
time: 101ms
memory: 4720kb

input:

100000 30
922269188 369834749
410656674 582752989
915412559 567790962
523644884 575040654
779826534 474741829
79287778 396639442
790418521 484030650
292760271 973501745
242009920 127609021
30327523 18389017
614527921 559953755
270366760 939674456
540864332 388540231
876192494 219456164
964681776 531...

output:

16201

result:

ok 1 number(s): "16201"

Test #41:

score: 0
Accepted
time: 105ms
memory: 4792kb

input:

100000 30
136665275 421002797
964797814 776538173
54313178 563428252
138005657 920182698
13938313 952554790
642086570 870344143
370758503 32769102
998689820 449769042
502402008 92503293
940313187 61383038
597343106 961289214
589369977 356534976
134358480 958770051
901438298 378656042
614221426 58960...

output:

16114

result:

ok 1 number(s): "16114"

Test #42:

score: 0
Accepted
time: 104ms
memory: 4804kb

input:

100000 30
985049439 849414884
686961488 513308125
493111319 142916881
780563010 180679949
324822337 606674450
458870364 343675948
818734310 481198211
383974834 716778480
315651526 916715218
437101134 258946082
748302803 684147653
346252460 603686945
724705460 545494259
975437372 209394526
693317699 ...

output:

16144

result:

ok 1 number(s): "16144"

Test #43:

score: 0
Accepted
time: 101ms
memory: 4720kb

input:

100000 30
247769836 829143251
163855234 490927721
131494914 885509354
711961742 164265313
809154530 86371080
750287818 108069594
7227603 693687398
61030725 667370469
86155599 526038926
42202756 582464041
551959686 11471074
930391808 903423583
124843225 787476756
969089189 308900053
330249311 7337174...

output:

16140

result:

ok 1 number(s): "16140"

Test #44:

score: 0
Accepted
time: 232ms
memory: 4628kb

input:

100000 100
107370122 683687096
121775119 747171754
420322323 753531112
782113799 686029807
804364604 816799066
308920045 190803076
872577154 274335601
990746131 311547629
681871658 640517365
684752844 661339478
246620090 64084116
771398132 623469325
569295998 837821020
192465509 147205890
276104708 ...

output:

43805

result:

ok 1 number(s): "43805"

Test #45:

score: 0
Accepted
time: 230ms
memory: 6084kb

input:

100000 100
690214806 452218202
587115927 745745502
374350704 134218848
920962087 237064460
302752459 645961306
874014664 644224000
212322684 339263528
568952841 890091875
565336172 334363100
473095886 238040528
914783770 109395773
118012111 840743129
190466327 587844677
14462487 185666434
361536135 ...

output:

43795

result:

ok 1 number(s): "43795"

Test #46:

score: 0
Accepted
time: 230ms
memory: 6000kb

input:

100000 100
418495569 934411623
939355025 135859670
212934116 995089593
136689365 82282827
896502815 319507929
912345915 152514929
159074874 95053017
851529684 398055618
203048128 897500989
408299589 135308910
129450000 296846974
438953800 535860438
159557343 11424905
501754667 939265041
156133044 51...

output:

43796

result:

ok 1 number(s): "43796"

Test #47:

score: 0
Accepted
time: 232ms
memory: 4560kb

input:

100000 100
173453710 765650650
112433907 588028115
158442185 630263818
94521658 970259136
198976733 479515876
393616388 432050049
654048593 562487159
297804175 292256109
667602110 164297477
841378415 207974738
818487122 340158086
782065677 690016495
780391758 54099748
159683363 88487803
80492424 242...

output:

43908

result:

ok 1 number(s): "43908"

Test #48:

score: 0
Accepted
time: 230ms
memory: 5924kb

input:

100000 100
708847064 211561391
834516349 28773492
589432272 590202796
458297868 758528334
272478556 36421979
435435937 764369474
255027826 24496518
887031908 896371357
718941834 946504219
669588031 646128399
823620898 505271469
629156194 228149804
77495867 797506289
698633407 987996397
732050137 268...

output:

43887

result:

ok 1 number(s): "43887"

Test #49:

score: 0
Accepted
time: 53ms
memory: 4456kb

input:

100000 10
44894 41921
33762 29007
33092 27757
2242 40619
43497 25
9269 44778
39648 32605
28401 40265
20896 42619
865 16478
49905 11676
46567 39928
27304 13961
39134 16305
36860 40592
38960 8856
27923 41316
46775 25377
4552 19093
8750 43296
39053 13608
33832 13179
20208 21593
17630 21198
42957 24475
...

output:

5898

result:

ok 1 number(s): "5898"

Test #50:

score: 0
Accepted
time: 53ms
memory: 4424kb

input:

100000 10
46829 18484
35193 9429
11120 17886
34496 48402
37270 11502
37073 40870
44099 6853
43532 32502
49137 33314
36847 34736
5438 21287
4906 14216
21427 48399
31716 12771
12308 44422
46263 4568
23945 41197
24098 16417
16922 11455
23760 3679
45979 33107
30461 3952
14757 20315
9867 19938
11393 2315...

output:

5912

result:

ok 1 number(s): "5912"

Test #51:

score: 0
Accepted
time: 53ms
memory: 4380kb

input:

100000 10
27798 6537
10189 46185
45800 39978
16760 49723
24348 27004
11724 41194
24745 46260
38229 23087
45050 38897
21033 46087
24169 13503
8229 3496
11514 37981
18025 21713
27183 12199
26015 12879
16282 45742
32391 6150
47174 15430
24728 3694
8131 43848
15285 46868
24892 21050
19875 4312
44712 321...

output:

5915

result:

ok 1 number(s): "5915"

Test #52:

score: 0
Accepted
time: 49ms
memory: 4432kb

input:

100000 10
24093 33265
41510 45564
3701 31674
6575 10462
40037 14699
30755 6258
45849 38302
4432 20278
30895 49936
16746 5814
46320 9542
15147 8882
44256 32959
21913 21971
9231 21996
35882 30499
33295 48045
23757 10967
20862 30198
8522 14300
27224 23077
9971 16668
40269 44357
2501 28903
14573 22154
1...

output:

5887

result:

ok 1 number(s): "5887"

Test #53:

score: 0
Accepted
time: 53ms
memory: 4684kb

input:

100000 10
771 7417
40164 30070
17343 20684
44734 42191
48425 5274
29986 33265
15500 26916
16120 36760
135 32215
28911 4378
45244 9612
49170 24102
15633 7640
37926 3086
26710 15469
43119 45391
39478 1767
29520 16769
9302 33403
49240 13619
19219 38539
6195 37268
44278 5804
5882 273
38267 12563
6866 26...

output:

5895

result:

ok 1 number(s): "5895"

Test #54:

score: 0
Accepted
time: 49ms
memory: 5988kb

input:

100000 10
40103 41043
11533 38936
34673 48369
38520 45099
27074 37139
16250 24591
4266 7948
33550 17870
40380 18982
26418 26976
2589 13457
38276 41269
17520 33411
23816 5319
43243 41512
28356 47516
11502 48264
39026 28462
206 16603
33846 39525
9368 8885
5825 15902
21131 37408
20556 16620
32350 17904...

output:

5865

result:

ok 1 number(s): "5865"

Test #55:

score: 0
Accepted
time: 54ms
memory: 4484kb

input:

100000 10
18405 36182
8808 30871
20682 43298
15134 20031
12274 4950
18189 46284
18489 26189
42973 46142
7576 28708
35672 12650
25625 21285
42455 39015
27012 46372
36550 46130
32906 8746
41145 44969
10446 23688
48341 33590
35912 39013
5951 3992
38489 10373
21062 38479
22399 4564
47903 12595
18607 349...

output:

5869

result:

ok 1 number(s): "5869"

Test #56:

score: 0
Accepted
time: 53ms
memory: 4424kb

input:

100000 10
10419 17428
10384 23208
26635 22208
12519 23281
31618 11975
36668 19047
2348 20868
47610 27266
35751 319
28411 9234
9723 31100
36818 39982
28123 7414
22057 11210
13615 44387
46706 42830
47282 13653
37565 49179
49199 985
21862 34403
33013 9886
4563 18460
5609 44698
48127 31294
25135 32119
1...

output:

5849

result:

ok 1 number(s): "5849"

Test #57:

score: 0
Accepted
time: 49ms
memory: 4488kb

input:

100000 10
49758 42801
5247 35260
27603 14046
27777 23387
24350 28851
7423 4324
43427 19940
35684 46625
43410 39272
12790 730
13440 293
7912 15646
35112 28026
26151 46673
10198 34586
42567 28221
11163 6350
10686 45921
4828 10350
20200 40955
17239 4267
23496 4254
21413 37955
39378 17117
20606 47200
21...

output:

5862

result:

ok 1 number(s): "5862"

Test #58:

score: 0
Accepted
time: 230ms
memory: 4568kb

input:

100000 100
32966 13556
1270 43290
9762 30489
17597 47740
41587 39417
22547 37035
25009 20657
39209 47447
26450 21901
25237 17676
14081 16317
22749 17606
37622 34431
1206 10190
32815 9387
16778 37903
38512 16839
44178 31492
12497 7364
49050 48561
41354 43317
4391 7801
11727 31491
36212 20887
40695 45...

output:

44143

result:

ok 1 number(s): "44143"

Test #59:

score: 0
Accepted
time: 231ms
memory: 4464kb

input:

100000 100
1954 14386
47014 21843
25533 25538
37183 8200
6037 19781
18831 10008
19505 11215
48729 25693
20817 10993
21480 13159
5751 25595
41156 46914
33731 42244
49342 22337
44043 30988
30076 36085
36695 13837
1007 37848
19241 9439
6789 9958
26167 15098
13218 41428
16348 33413
12615 38876
44505 378...

output:

44125

result:

ok 1 number(s): "44125"

Test #60:

score: 0
Accepted
time: 232ms
memory: 4632kb

input:

100000 100
18904 33525
44960 18669
8513 45617
40727 42032
9377 887
28084 43857
35300 36385
22499 987
867 24615
5096 11334
1816 48820
39185 13886
6815 42163
46073 21935
34794 20620
37671 31553
26443 18162
47865 24197
12998 33364
26834 17696
44993 41481
13422 38620
32933 13760
2705 23310
20369 18387
2...

output:

44159

result:

ok 1 number(s): "44159"

Test #61:

score: 0
Accepted
time: 229ms
memory: 4792kb

input:

100000 100
21632 23973
20301 32566
29723 8308
5676 31707
38105 43660
40727 14588
12387 39156
46181 32436
21405 27391
5743 28361
15742 20032
2470 15755
21212 22680
16943 3253
46706 44415
46660 17934
5254 5018
6139 5468
16326 29750
2502 2155
25233 29719
44019 9888
15583 47657
5746 29514
23832 41659
30...

output:

44028

result:

ok 1 number(s): "44028"

Test #62:

score: 0
Accepted
time: 231ms
memory: 4496kb

input:

100000 100
21259 23178
7595 21417
34554 5730
35579 23480
24663 7518
38397 10615
48887 13437
4863 18814
44222 24365
32895 28115
33366 17566
7084 32287
39354 28300
17717 2870
20521 39885
22301 12017
19821 30967
41057 3649
45793 46447
22939 45570
14022 49750
44899 21573
19396 20470
42354 22426
11213 14...

output:

44031

result:

ok 1 number(s): "44031"

Test #63:

score: 0
Accepted
time: 231ms
memory: 4564kb

input:

100000 100
47559 11845
3934 21064
27456 24311
27938 39841
38655 44234
11441 14530
11708 12645
6890 18205
16184 34841
44231 9686
4897 39177
42953 44756
29430 32982
669 20803
22962 39505
9884 43882
39172 42103
29018 34329
30419 46503
21052 30462
22596 3998
11224 26204
21042 24094
43911 41883
21271 604...

output:

44209

result:

ok 1 number(s): "44209"

Test #64:

score: 0
Accepted
time: 231ms
memory: 4568kb

input:

100000 100
33076 5658
47956 22888
10860 11523
34886 25542
18642 18909
5725 22536
7069 43229
4737 35471
31907 37548
15381 28329
47005 4961
48174 21539
12562 38222
29411 9122
17618 19650
10240 45595
44478 25720
48905 49150
1543 504
2061 25168
40070 26157
27767 29706
40040 24417
13260 49802
14123 3830
...

output:

44124

result:

ok 1 number(s): "44124"

Test #65:

score: 0
Accepted
time: 230ms
memory: 4460kb

input:

100000 100
450 3215
29126 12677
41731 18750
9630 16828
38510 42631
38906 32532
29319 19044
39407 17624
19022 14258
12279 45045
7016 47218
34088 9229
49184 35850
31154 19345
42785 28936
3514 21664
21008 24095
24488 45420
4243 48732
12396 12192
29547 13446
10917 16758
7919 43829
37293 2641
7597 22209
...

output:

44103

result:

ok 1 number(s): "44103"

Test #66:

score: 0
Accepted
time: 226ms
memory: 4564kb

input:

100000 100
40205 1757
10196 34164
746 20794
38425 46551
30592 36314
42241 20918
11852 23303
47748 29587
26120 45301
42810 14360
5771 36969
26286 17632
48827 22129
6678 15292
12105 49755
48747 11735
1068 15351
12096 30974
19014 1098
44576 30222
18061 2139
4573 22284
14364 47405
6481 10732
6454 4791
2...

output:

44167

result:

ok 1 number(s): "44167"