QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#86302#1144. Dungeons Gamehydd100 ✓2164ms1002772kbC++142.3kb2023-03-09 17:48:022023-03-09 17:49:07

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 11
Accepted

Test #1:

score: 11
Accepted
time: 2ms
memory: 7264kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
1 73
9829
6
1
0
0 2
0 7
0 2
0 2
0 6
0 2
0 6
0 2
0 7
0 7
0 10
0 1
0 9
0 5
0 5
0 7
0 5
0 9
0 3
0 8
0 9
0 8
0 6
0 4
0 1
0 9
0 8
0 10
0 10
0 1
0 8
0 8
0 8
0 7
0 3
0 10
0 4
0 2
0 9
0 4
0 1
0 3
0 6
0 10
0 10
0 10
0 1
0 1
0 10
0 1
0 5
0 9
0 2
0 6
0 8
0 9
0 6
0 6
0 6
0 2...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
19659
19658
19659
19659
19663
19659
19663
19659
19658
19658
19661
19658
19660
19662
19662
19658
19662
19660
19660
19659
19660
19659
19663
19661
19658
19660
19659
19661
19661
19658
19659
19659
19659
19658
19660
19661
19661
19659
19660
19661
19658
19660
19663
19...

result:

ok 75 lines

Test #2:

score: 0
Accepted
time: 4ms
memory: 7168kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
10 86
1820 5250 4629 1552 6552 3205 7668 2419 6343 9299
8841 5649 9910 9479 9718 2612 7483 2360 7862 1567
8 8 9 5 6 9 8 8 9 10
4 6 4 1 4 6 8 7 4 7
4 7
3 10
4 5
2 10
2 4
0 10
3 4
3 1
0 6
0 4
5 8
9 4
4 5
5 10
7 6
6 5
1 10
8 10
6 1
4 4
9 1
8 7
6 4
5 2
5 3
4 1
5 2
5 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
39587
30381
39585
39782
39776
38713
30375
30372
38709
38707
25745
21992
39585
25747
22787
23130
28784
37734
23126
39584
21989
37731
23129
25739
25740
39581
25739
25743
23132
37730
22784
39775
23135
21994
30373
30377
25738
25740
39773
39775
22784
39581
21993
39...

result:

ok 88 lines

Test #3:

score: 0
Accepted
time: 6ms
memory: 12176kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
2000 100
6 5 4 7 6 7 8 2 10 8 3 10 1 2 8 6 5 7 6 9 10 9 9 6 5 7 2 9 3 6 1 8 7 2 10 1 1 3 5 7 8 6 2 4 1 4 1 9 6 6 2 8 7 3 8 10 1 7 6 1 3 8 10 5 9 4 9 10 1 1 6 6 7 3 9 5 3 6 10 2 2 6 9 3 10 4 10 7 6 1 6 3 8 9 2 9 6 7 7 10 4 8 10 7 6 7 10 3 4 10 3 1 3 8 7 3 4 2 5 1 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
7992
3684
3761
1617
8916
92
736
348
6273
63
113
637
83
648
131
242
42
467
54
76
755
225
6606
406
7559
1112
49
1411
5462
7112
359
3494
586
8880
4130
835
754
4004
120
8010
2458
3495
507
49
26
2624
4822
4229
58
264
657
81
656
119
1867
8231
54
10050
307
251
494
86...

result:

ok 102 lines

Test #4:

score: 0
Accepted
time: 33ms
memory: 131228kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 100
4547 4379 5838 2714 9394 8411 1892 791 1465 7401 5997 8178 5151 4873 7324 3859 4727 8682 5170 2686 3148 7413 5623 5264 2132 6619 1134 5120 2927 826 147 6065 7239 550 2813 5292 4848 6321 3710 9592 5014 5973 6559 6852 3363 198 4823 7881 9224 4018 4851 191...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
52719
67129
59750
66538
53093
63102
57652
28016
46641
62082
85963
65115
73771
61010
61401
65872
54147
47937
73083
66786
35930
57881
64963
64841
74820
21746
68255
59177
98803
71062
53051
62505
64403
47017
28540
54245
66274
53455
64550
53855
67980
44220
49543
52...

result:

ok 102 lines

Test #5:

score: 0
Accepted
time: 2ms
memory: 12136kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
2000 100
8141 764 1797 8119 6328 4665 7687 420 8174 8815 4641 1421 7313 1855 3498 3491 1084 3302 3333 4285 8567 1244 2907 1378 8001 2801 6755 2493 8405 8961 8523 120 808 5134 4477 7844 4806 9466 8461 9148 8234 9132 1848 4376 6836 7735 8708 4661 9938 3736 1348 251...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
59385
59377
57130
26938
59390
59398
59407
59378
59380
59407
57130
59405
57130
59404
57129
59393
59295
42277
59535
59380
59409
26577
59392
34492
57130
57130
59409
59395
59393
53055
59510
59398
59602
57130
59407
59377
59389
59385
38973
34594
59400
59400
59390
59...

result:

ok 102 lines

Test #6:

score: 0
Accepted
time: 36ms
memory: 131372kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 100
269 6998 1454 3473 3223 8923 883 6480 759 3448 6669 7537 7453 6217 5143 5685 7551 3009 1525 7765 3024 80 902 499 90 7964 3363 8494 3989 3273 2479 1708 8064 7539 5126 3726 9413 3537 5904 4017 1382 6178 7068 5610 964 5840 9623 1511 6772 4785 9109 866 2042...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
73187
61182
61152
90223
63019
61183
89591
36034
61148
61151
61189
55286
61173
39089
76739
68902
64578
63029
36027
61148
48847
27816
36041
61179
50918
71528
36033
49825
55276
65010
36110
27787
76640
55989
27808
64645
55806
43498
64573
61150
70180
73109
36095
61...

result:

ok 102 lines

Subtask #2:

score: 26
Accepted

Test #7:

score: 26
Accepted
time: 3ms
memory: 9644kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
1000 1000
1130998 3946545 6545866 7293696 9624001 5934576 91883 8467808 5293516 4377969 4270305 6396962 273361 88842 3015089 8325041 3690612 3735050 9510254 8527761 1038723 5522813 1877104 5699491 3708597 4192999 6479390 5728351 459885 627590 778790 9813273 44970...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
58554923
59397831
43907143
30396423
65329773
72733211
63602617
61768587
62204954
56621402
17618012
34979569
81400240
40358892
34992290
14843953
33603468
41098136
50889729
38925800
41083189
15432148
39749093
31453558
23471995
55658052
9381381
47354455
58490304
...

result:

ok 1002 lines

Test #8:

score: 0
Accepted
time: 389ms
memory: 1002568kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
3 10 1 9 5 8 10 7 3 8 2 7 5 6 3 8 1 5 8 7 2 10 3 2 6 2 10 6 9 2 9 5 10 6 10 7 9 10 5 8 6 7 9 10 6 10 7 7 3 1 2 3 3 1 3 3 4 10 7 4 6 7 5 3 7 9 1 10 9 5 8 4 5 4 1 10 3 4 9 6 6 2 1 4 9 7 7 2 10 2 7 2 3 1 4 3 3 10 1 7 4 6 6 9 4 4 10 9 4 3 9 4 3 7 6 4 3 9...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
26183086
25173101
24639932
29354227
23911681
21313155
28133630
21922345
19197043
26096603
20812039
20599547
27834568
20168071
25638932
26365158
24609835
27271704
29326719
30622152
30306553
27040858
20214190
24642012
28739426
30918391
27669745
26064767
26504701...

result:

ok 50002 lines

Test #9:

score: 0
Accepted
time: 384ms
memory: 1002436kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
10 3 3 7 4 5 9 6 3 8 5 1 4 6 4 9 9 7 2 8 3 9 5 9 2 9 10 5 9 1 3 6 1 7 5 8 6 3 1 9 7 9 5 5 5 8 9 3 7 7 8 2 10 1 3 1 4 4 7 6 5 7 3 1 8 1 9 6 1 10 2 10 2 6 5 1 3 6 4 8 4 5 4 5 9 9 9 1 3 8 5 7 6 10 4 7 5 9 3 7 1 4 4 1 6 1 7 7 6 2 7 6 8 1 1 9 7 2 2 7 5 7 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
17385116
16964987
16491779
18226509
18377794
18593965
21209150
27505705
18777861
23585115
17737506
16197284
23012768
22410134
19027927
18654183
21295884
17046902
18820278
21288170
16172348
18986618
16005480
20137663
17052655
20356465
21820565
27390893
19037048...

result:

ok 50002 lines

Test #10:

score: 0
Accepted
time: 365ms
memory: 1002616kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
808 429 146 808 808 146 429 808 429 808 146 808 146 146 429 808 429 429 146 429 429 146 146 429 808 808 146 808 429 146 808 146 146 429 146 429 429 429 808 808 429 808 808 146 808 808 146 429 146 429 429 429 146 429 146 429 146 808 429 429 808 146 14...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
123876423
173846597
102961571
182623485
112884645
82599726
69776361
14360823
151059494
96543939
87106236
129917076
102457532
88816950
135828596
7502958
73785425
23371453
174983507
22857906
153952653
93721223
43292870
184111363
159346971
5323016
43385997
131019...

result:

ok 50002 lines

Test #11:

score: 0
Accepted
time: 506ms
memory: 1002524kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
672 570 672 570 247 247 570 570 742 247 247 672 672 247 247 672 570 672 247 672 672 672 742 672 672 672 672 570 742 247 742 742 247 247 570 742 570 247 672 570 570 742 247 570 672 672 570 672 570 742 247 570 742 570 742 247 672 672 742 247 672 672 74...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
1640149
1636624
1639799
1638845
1758790
1638531
4699347
1645829
1636222
1641458
1641930
1639887
1637922
1637949
1641810
6572364
2014270
1640008
1638416
2612664
1655714
1639398
1787897
2682458
1644765
1637854
1665489
1644277
1688430
1639578
1638482
8174516
1635...

result:

ok 50002 lines

Test #12:

score: 0
Accepted
time: 420ms
memory: 1002560kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
2 8 8 2 8 9 7 10 5 9 10 2 2 1 9 1 8 2 7 2 5 2 4 2 8 5 9 6 6 1 10 10 4 2 6 8 7 4 7 7 2 1 8 3 6 2 4 10 3 1 3 9 1 9 8 10 10 3 6 4 7 3 6 8 4 10 8 7 5 8 7 10 1 9 10 10 2 1 5 1 10 10 9 2 6 10 8 7 3 2 8 6 10 2 3 10 2 8 5 8 3 5 9 4 7 7 4 6 4 10 10 10 4 9 1 7...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
28103921
28936256
29214158
28510316
28506108
28265778
28215978
29339684
29121602
17048464
28806496
29211595
28378860
28539532
29099578
28478737
28712054
29107853
28699648
29053923
28512595
29237820
28376382
28378508
28948008
28976367
29215404
28841790
28833516...

result:

ok 50002 lines

Test #13:

score: 0
Accepted
time: 507ms
memory: 1002540kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
1 3 1 1 3 1 3 3 1 3 2 1 2 3 3 3 3 3 1 3 2 1 2 1 3 2 2 1 1 2 3 1 3 2 2 2 3 1 3 2 3 2 1 3 2 2 3 2 1 2 2 3 3 1 3 1 1 1 3 2 2 1 1 3 3 2 3 1 1 2 1 2 3 3 1 1 3 1 1 3 2 2 2 3 3 1 3 1 1 1 3 1 3 2 3 1 2 1 2 1 1 1 2 1 3 1 3 1 1 1 3 2 2 1 3 3 2 3 3 3 2 3 1 2 3 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
21206373
21205148
21206122
21010487
21187862
21205705
21205820
33003406
33085214
21206398
20785314
31878204
31880757
20813691
21205402
33039915
20958210
21001874
21062205
31897062
21012362
21206179
33262125
31915049
33207675
21205148
21189138
20793133
31907727...

result:

ok 50002 lines

Subtask #3:

score: 13
Accepted

Test #14:

score: 13
Accepted
time: 3ms
memory: 13768kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
1000 1000
2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 2918477 29184...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
17881661
33040130
34604564
25280961
28194570
23906798
15912230
29857216
28036550
24990418
20254260
16847281
36206803
19938498
34824909
24557488
26348424
25668821
22620286
24448869
27422275
16663870
17422116
22692168
15018428
21363378
17674438
14701572
21427171...

result:

ok 1002 lines

Test #15:

score: 0
Accepted
time: 109ms
memory: 135688kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 2671299 267...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
57444627
30638506
31612306
25428389
41281602
32571734
33830016
43854914
49556558
19628592
42889496
39731682
17955565
47360652
36351342
38170417
28981343
44668365
45347762
29769758
24486732
25948887
33222555
33033192
42479566
29471696
30285781
25081732
20379694...

result:

ok 50002 lines

Test #16:

score: 0
Accepted
time: 72ms
memory: 135748kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 4822500 482...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
91237758344
56798718481
58213038426
2952775546
75786438438
54505200466
150662848548
151777097031
157996669813
120440559935
155551706384
14231353298
139359032883
32245823847
153614854743
114524877618
144226128602
149382227142
86243233153
80444136066
10304964777...

result:

ok 50002 lines

Test #17:

score: 0
Accepted
time: 59ms
memory: 135720kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
7377028
9096325
6823007
9168333
985322
1430782
6281615
8519413
8329812
7559422
3246957
9264194
1980097
1854450
6271420
3705626
1726988
4284770
7788992
6152689
8340960
3961611
2243094
4219222
1551774
10052608
4418715
4369412
3434255
6431717
1166384
6716706
1799...

result:

ok 50002 lines

Test #18:

score: 0
Accepted
time: 56ms
memory: 135588kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
215566
662504
7967757
8373823
9147232
7391856
2563993
3063168
5940967
2693116
7152186
2919161
1414814
9043090
9003486
1447769
8936836
7049390
3253220
8275423
5626855
8965543
396841
8900139
223406
9266444
499479
3713378
2642994
9277999
6032800
3922678
10011177
...

result:

ok 50002 lines

Test #19:

score: 0
Accepted
time: 134ms
memory: 135580kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 3574781 357...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
44507393
42897398
46472175
17873925
42897387
46472157
51467701
42897398
50046943
46472219
60771289
50046942
53621719
28598288
42897446
42897456
42897427
50046969
65640025
60771287
39322625
46472174
35747842
42897410
28598276
42897417
42897378
39322613
42897412...

result:

ok 50002 lines

Test #20:

score: 0
Accepted
time: 115ms
memory: 135800kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 6436892 643...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
83679596
77242704
64368920
96553380
70805812
77242704
90470832
90116488
70805812
90116488
77242704
83679596
64368920
90116488
57932028
64368920
115864056
90116488
90116488
83679596
96553380
90116488
70805812
90116488
70805812
90116488
83679596
83679596
9011648...

result:

ok 50002 lines

Test #21:

score: 0
Accepted
time: 58ms
memory: 135580kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
267557
266437
282945
13162
276927
325842
83809
132172
320435
1720288
277697
255928
4088933
9376788
2011967
336229
1389482
54144
281297
338547
502658
61819
524200
383615
64811
237605
509795
299379
6345178
345651
823700
171376
55061
128273
1336638
10213892
14739...

result:

ok 50002 lines

Test #22:

score: 0
Accepted
time: 82ms
memory: 135552kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
22117
89
432597
143
500
60
91
2206271
76320
60
86
580
846054
136
725241
210
2685
2598481
155
37427
7307
55
3043
172
78
71
4341930
37542
66
32547
106200
124
9424
102
974024
2573
3307
470716
2194602
72
636760
1331
41630
24710
1440923
301
90
94
69
85
33286
151225...

result:

ok 50002 lines

Test #23:

score: 0
Accepted
time: 66ms
memory: 135652kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
77561
406533
15473
3460586
77339
1034161
31617
4673066
275721
726121
122139
203877
653079
51930
129181
3133578
46310
5025510
453619
62109
329817
56347
48669
85165
80591
81250
39725
362751
49052
5598528
78959
788594
73245
58312
85275
6144989
63026
15169
34552
7...

result:

ok 50002 lines

Test #24:

score: 0
Accepted
time: 62ms
memory: 135648kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 6428412 642...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
46411
41954
45359
45977
41159
46013
47253
48262
47179
46103
47338
45225
40389
49457
43216
45663
45858
49264
43064
42553
46555
49288
45764
41590
48803
46016
44808
48907
40717
48421
48572
44842
45648
43908
47572
48728
42099
40883
48834
42499
44452
45587
46295
45...

result:

ok 50002 lines

Test #25:

score: 0
Accepted
time: 142ms
memory: 135648kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
1290000000
3720000000
3090000000
3470000000
3490000000
2740000000
600000000
1790000000
2660000000
3690000000
1250000000
1860000000
640000000
3450000000
3330000000
760000000
3610000000
1270000000
2280000000
2500000000
170000000
3780000000
1870000000
2330000000
...

result:

ok 50002 lines

Test #26:

score: 0
Accepted
time: 84ms
memory: 135720kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000
20000000...

result:

ok 50002 lines

Subtask #4:

score: 12
Accepted

Test #27:

score: 12
Accepted
time: 4ms
memory: 13848kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
1000 1000
661 832 661 985 832 661 661 985 985 985 661 661 661 985 832 985 661 832 661 832 985 832 985 661 985 661 661 661 661 661 661 985 985 985 661 832 985 661 661 832 985 661 985 832 661 661 832 832 661 661 661 832 661 661 661 985 832 832 832 985 661 661 985 8...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
21024092
23787159
23041267
21350537
27120767
21292871
25822152
25512517
24195955
23172162
25636073
20984614
20875838
21163683
24384761
23377191
22223954
24378654
21075265
25399682
25364687
19645895
19114648
19277804
24098134
20586433
21081797
24061308
20465404...

result:

ok 1002 lines

Test #28:

score: 0
Accepted
time: 73ms
memory: 135716kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
891 891 262 262 891 891 262 262 891 262 262 891 891 262 262 891 891 891 262 262 262 262 262 891 891 262 262 891 891 891 262 891 262 262 262 262 262 891 891 262 891 891 891 891 262 262 262 891 262 891 262 262 891 891 262 262 891 262 262 891 262 262 262...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
17781107
17714843
17727076
17683907
17707973
17737039
17740420
17700705
17742003
17706598
17734408
17723457
17702595
17680818
17696863
17746408
17741545
17679963
17770134
17782588
17811602
17689945
18338901
17759125
17715206
17720871
17691907
17780424
18375323...

result:

ok 50002 lines

Test #29:

score: 0
Accepted
time: 73ms
memory: 135568kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
3665333 4946451 4946451 3665333 796498 796498 3665333 796498 4946451 796498 4946451 3665333 796498 4946451 796498 3665333 3665333 796498 3665333 3665333 4946451 3665333 4946451 3665333 796498 3665333 4946451 4946451 3665333 4946451 3665333 3665333 494...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
52763639
29424361
29541756
37715570
49059010
29830271
41561291
37719140
41048781
36287125
34553321
18307829
57836951
46839431
28670304
27842183
23872868
55390182
20056853
53532704
22853065
27697992
36199706
36450088
50702064
31413160
44653787
44269990
64168254...

result:

ok 50002 lines

Test #30:

score: 0
Accepted
time: 71ms
memory: 135572kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
634 581 581 642 634 642 667 667 667 634 634 642 581 634 642 667 581 642 642 581 581 642 634 667 634 667 642 667 634 634 634 634 642 581 634 642 642 667 642 634 634 642 642 581 667 667 581 667 581 642 642 642 642 581 581 642 634 634 642 634 642 642 642...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
12244222
11684979
18269057
12098352
18447142
8094367
3339443
17337948
8379732
18940026
14437552
11559807
8111923
18816813
9268431
18451342
17808047
15270560
19810281
16065096
4554566
22272991
19117842
18281014
9504228
11761477
10453787
18532611
13875094
133378...

result:

ok 50002 lines

Test #31:

score: 0
Accepted
time: 69ms
memory: 135724kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
601 560 666 666 560 601 666 560 560 601 436 560 436 560 560 601 601 601 560 666 436 666 436 560 666 560 666 666 666 560 436 436 436 601 560 560 560 560 560 436 436 436 560 436 601 601 436 601 666 560 666 601 436 601 560 436 436 436 601 601 560 666 560...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
20184187
15193162
16596590
19858634
18684323
26599358
19847776
16290932
27005215
17759272
28120317
26140632
25014826
27932854
19274083
21461449
26989022
18500139
28283397
15734580
21779487
17572698
17289140
22164952
18363738
24913787
16533521
20757365
15787543...

result:

ok 50002 lines

Test #32:

score: 0
Accepted
time: 125ms
memory: 135652kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
5539720 8696726 1880513 8696726 1880513 3071424 8696726 3071424 8696726 1880513 5539720 1880513 5539720 8696726 1880513 3071424 5539720 3071424 3071424 8696726 3071424 5539720 8696726 5539720 1880513 3071424 1880513 1880513 3071424 1880513 8696726 553...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
50106464
60009785
52846437
29468941
49917620
31936887
47237366
34420916
31936690
34421027
38165768
59062683
38165739
34420909
38683564
31936875
62204373
49917689
26396620
59062737
70126106
57661739
38683708
45484237
45484180
49917622
31936695
38581490
38683490...

result:

ok 50002 lines

Test #33:

score: 0
Accepted
time: 119ms
memory: 135564kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
983 983 983 11 983 11 11 983 983 11 11 983 983 983 983 983 11 11 11 11 983 11 983 983 983 983 983 983 11 11 11 983 983 983 983 11 983 983 983 11 11 983 983 983 11 11 983 983 11 11 11 983 11 983 11 11 983 983 983 983 983 983 11 11 983 11 11 11 11 11 98...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
14383791
8430107
11961814
18124207
17850505
15912622
15874403
16428290
18124207
6201372
11317835
18123224
11979570
18124207
10454471
18125201
18124207
18124207
9543465
12164495
11804500
15845695
14730889
10459009
7622889
18123224
18124207
18123224
18124207
181...

result:

ok 50002 lines

Test #34:

score: 0
Accepted
time: 97ms
memory: 135648kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
863 264 264 409 863 863 264 264 863 409 264 863 264 264 264 409 863 409 264 409 863 863 409 409 863 409 264 409 409 409 409 409 409 409 863 863 409 264 863 409 264 264 863 863 863 863 409 863 264 264 264 863 863 409 264 264 863 264 409 409 409 264 409...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
18708718
20396861
8996581
15798021
20943239
13521364
21190977
9938624
9219816
10492821
21476402
16163039
21435946
26235255
15187145
10386675
21476437
21165107
10155167
12582870
21476434
24644995
21471269
13755116
16211540
21450176
10066508
19398079
15800014
98...

result:

ok 50002 lines

Test #35:

score: 0
Accepted
time: 67ms
memory: 135704kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
10000000 2 2 2 2 10000000 10000000 2 2 10000000 10000000 2 10000000 2 2 2 10000000 10000000 10000000 10000000 10000000 2 10000000 10000000 2 10000000 2 10000000 2 2 10000000 2 2 10000000 10000000 10000000 10000000 2 10000000 2 2 10000000 2 2 10000000 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
28571
28806
16037
24370
1992
542
17729
21433
8542
28110
14308
8150
21287
25955
3763
9261
28980
25186
13003
7595
23564
25586
17519
11893
2264
5615
18153
16178
28373
6325
27619
11838
3853
5951
1481
3187
18333
7228
16739
16279
10314
20862
23518
19027
3852
12420
5...

result:

ok 50002 lines

Test #36:

score: 0
Accepted
time: 85ms
memory: 135564kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
200000 300000 500000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 100000...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
24932
6667
12521
2276
19176
31577
1363
15015
783
10416
25444
5091
3751
29970
28978
2434
290207286
4947
27399
15393
25252
2456
39173
290203350
22379
28385
16597
19294
12233
15804
9362
34422
290204215
35432
28550
22945
12669
290203941
15013
3406
32259
34287
2607...

result:

ok 50002 lines

Test #37:

score: 0
Accepted
time: 217ms
memory: 135584kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
1000000 1000000 1000000 1000000 2 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 4234521 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1000000 1...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
201000000
53000000
175000000
151000000
131000000
248000000
98000000
313000000
223000000
192000000
148000000
166000000
165000000
147000000
272000000
253000000
168000000
111234521
246000000
108234521
74000000
289000000
128234521
207000000
174000000
214000000
740...

result:

ok 50002 lines

Subtask #5:

score: 27
Accepted

Dependency #1:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #38:

score: 27
Accepted
time: 47ms
memory: 134904kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 1000
8530336 7029895 7673748 5376076 5205976 7446081 9693594 6824814 4100307 5687709 7380706 9622665 9661001 9548581 4151038 6876805 7612143 7690605 4493078 8955253 1116212 3480789 7474861 3440083 3396735 1748934 1706336 7939909 6149236 3082353 4715304 8663...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
68792413
72532822
62749545
78259511
44353333
65585864
62413368
39481566
53094200
65624670
51655659
53440675
37034648
65457670
45497052
59992004
83892509
74444773
45183542
58055969
71878127
68149381
41826228
71362474
46438590
105319023
69782414
60947351
4337741...

result:

ok 1002 lines

Test #39:

score: 0
Accepted
time: 73ms
memory: 135596kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
7160074 1273217 2407873 1249015 6278152 981859 1991575 5478276 6215446 4669094 6402084 1421304 5910388 3207419 9096209 7497239 9641026 711624 59656 8028405 5154372 569185 7972213 7789370 6651935 594895 8033352 1946975 697117 8694540 6889649 2951023 56...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
89446737
92855207
52084572
75106038
68869588
76208710
58986303
53732183
67865288
66868988
71321786
94731930
51607208
83018455
67343128
54800093
61378180
70846419
47207703
89591468
55499156
64631867
83706983
80960188
45632468
60558083
73737697
76635178
78164639...

result:

ok 50002 lines

Test #40:

score: 0
Accepted
time: 83ms
memory: 135840kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
1 10 5 5 3 6 9 3 6 4 3 4 2 5 5 2 5 1 8 4 4 4 8 7 7 10 7 2 7 8 8 3 10 9 4 1 10 7 5 7 3 8 8 3 10 6 2 5 2 3 10 1 3 7 1 2 8 8 9 7 7 2 7 8 5 10 7 4 5 9 6 5 10 9 4 10 2 10 9 4 4 6 8 9 2 8 7 8 8 5 2 1 1 10 10 1 3 4 10 3 8 5 3 4 10 8 2 9 7 3 9 5 1 5 8 2 1 6 1...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
17889322
18346426
18230116
19102370
5866358
18825929
19127953
13270755
7255391
19384880
19087725
12023991
19057634
17732487
19192348
18259904
19035223
18220798
18132277
1492116
19134411
18652949
17668603
17775344
12723218
11263037
18851285
12460300
18189215
17...

result:

ok 50002 lines

Test #41:

score: 0
Accepted
time: 70ms
memory: 135804kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
5 10 7 8 3 4 7 7 3 6 2 1 1 5 9 5 7 7 8 2 4 1 1 10 7 2 3 4 10 1 7 3 6 5 5 4 1 8 5 2 2 3 9 1 10 8 2 4 10 1 2 6 8 8 7 2 8 4 4 6 6 5 8 2 2 6 4 4 5 3 3 4 8 7 1 1 8 1 8 1 3 1 7 6 1 1 9 8 9 1 7 10 6 7 1 8 5 1 9 2 9 3 5 10 5 6 10 5 3 10 5 6 4 1 3 7 8 1 10 8 7...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
18500073
18589190
18052901
19219847
18786682
18549709
19627605
17700471
17238240
18474187
18795059
20088222
17268757
17959722
19888467
18375313
18832313
19540883
18256429
17982745
18092354
20210471
19911304
18890656
19134194
19321303
17551069
18565708
18795109...

result:

ok 50002 lines

Test #42:

score: 0
Accepted
time: 103ms
memory: 135688kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
7424314 3189391 6293961 2967728 590185 1659214 7981047 5572223 129562 6196047 6974521 9066564 5421725 3761293 1806757 8497223 3494432 3065323 4515019 6229206 5209958 9449334 7357557 3378062 2039952 1682087 9828199 5587092 5097302 6120352 8318497 56292...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
78110950
99149158
46374216
83033696
67405203
80942238
87057113
70411082
55488261
59227823
109796606
51692437
66094718
59142444
74355925
79661005
60698389
62786280
90944265
86835895
92432986
67184848
60055926
61575890
85092613
72299424
101596433
63432450
909383...

result:

ok 50002 lines

Test #43:

score: 0
Accepted
time: 93ms
memory: 135580kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
5 10 9 6 9 1 5 7 9 1 5 1 3 3 9 1 8 10 7 3 7 6 2 7 3 6 4 6 6 1 1 1 1 3 3 4 8 4 3 9 10 8 4 6 8 9 5 7 10 7 4 1 10 7 6 8 5 3 6 2 7 5 1 8 4 3 7 7 2 1 2 6 2 9 9 1 10 1 4 7 4 3 10 9 1 6 1 10 2 10 9 6 4 7 3 5 4 2 5 10 3 5 8 3 2 8 7 6 3 9 7 5 6 8 5 6 10 3 4 4 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
19530964
21787230
18960063
22524282
23378794
21780107
23545588
23573378
23514906
23165587
23119447
23529723
21751620
23553114
23219030
23155497
23587725
23392750
23544180
20968601
23137885
23578008
18197610
23083774
23701387
23688989
22632853
21911483
23515222...

result:

ok 50002 lines

Test #44:

score: 0
Accepted
time: 99ms
memory: 135588kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
8 2 4 2 4 2 2 6 7 5 1 6 5 7 5 6 10 4 2 8 1 5 4 4 6 1 2 1 6 6 5 1 8 6 1 6 6 6 7 6 5 5 8 9 2 2 9 3 10 2 10 1 6 1 8 2 8 8 2 4 8 1 6 9 10 3 10 6 7 5 5 7 1 4 7 7 6 1 9 8 1 7 5 2 1 10 9 6 10 6 3 3 10 2 10 7 2 1 9 6 1 10 9 4 5 6 9 7 9 4 7 4 7 2 7 1 3 3 1 2 8...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
17187295
16793154
16162826
16197029
16714485
16442108
16720793
16572862
16478679
16171664
16648984
16796274
16202944
16174296
16150365
16212968
16739582
16171181
16740146
16777293
16172227
16168773
16516811
16669450
16137953
16174700
16927905
16675298
16989164...

result:

ok 50002 lines

Test #45:

score: 0
Accepted
time: 168ms
memory: 135564kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
2 1 1 8 4 4 2 2 3 10 1 3 4 2 9 7 10 8 7 10 4 1 1 4 4 1 4 10 6 5 5 9 8 9 5 6 8 3 3 10 5 1 4 3 10 10 7 4 5 9 10 7 2 7 5 9 1 5 8 10 4 2 6 2 3 7 4 5 4 1 4 2 4 4 2 6 7 9 5 10 9 9 8 9 7 7 8 7 6 8 1 7 8 4 8 5 6 7 3 4 6 2 5 5 2 3 4 1 8 10 5 9 1 3 8 2 7 1 6 8 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
101610137
100457159
44242057
44243090
36421761
82673262
105283157
132208067
126200331
41016799
36420172
105284002
126202444
135059661
44239586
108267339
96716295
41018763
135058287
44241336
44239498
72352828
124274619
24783882
65065805
82675352
133311604
44239...

result:

ok 50002 lines

Test #46:

score: 0
Accepted
time: 383ms
memory: 131768kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
49980 50000
2 5 5 5 17 17 17 65 65 65 257 257 257 1025 1025 1025 4097 4097 4097 16385 16385 16385 65537 65537 65537 262145 262145 262145 1048577 1048577 1048577 4194305 4194305 4194305 2 5 5 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
4601140546
6494695114
2006138720
6680024045
7381472075
3594362943
112584151
4446683746
4816469544
9275026637
9795882776
1850894717
6985551955
1486268693
6464694856
9670639609
5303378083
2677585723
4296600478
9670639607
1850894718
9725882489
7626801326
31084415...

result:

ok 50002 lines

Test #47:

score: 0
Accepted
time: 820ms
memory: 132032kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
49979 50000
2 3 5 9 17 33 65 129 257 513 1025 2049 6145 14337 30721 63489 129025 260097 522241 1046529 2095105 4192257 8386561 2 3 5 9 17 33 65 129 257 513 1025 2049 6145 14337 30721 63489 129025 260097 522241 1046529 2095105 4192257 8386561 2 3 5 9 17 33 65 129 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
670047087
1038808400
536042290
1088812938
1222817399
1005059868
1440579419
720298946
1139066318
854422621
1457325995
385290737
686852992
1206067236
33523755
1155815137
1088822670
16783374
703552403
552792839
418788378
1424072522
301534593
1457444725
1005059611...

result:

ok 50002 lines

Test #48:

score: 0
Accepted
time: 900ms
memory: 133656kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
50000 50000
2 10000000 2 10000000 2 10000000 2 10000000 10000000 2 10000000 2 10000000 10000000 2 10000000 10000000 2 2 10000000 10000000 10000000 2 10000000 2 2 10000000 10000000 2 10000000 17 10000000 17 17 10000000 10000000 17 10000000 17 10000000 17 10000000 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
1181123833
1201685954
741730544
1181113116
491101472
1220969164
1402523563
1261004615
1892455918
400813733
1892455931
1220969065
1220968855
1220968972
1220968932
1220969221
980994661
741713495
1892455934
1471931765
1021629313
1021629466
1402528060
400813774
11...

result:

ok 50002 lines

Subtask #6:

score: 11
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Test #49:

score: 11
Accepted
time: 2ms
memory: 9692kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
1000 1000
7309728 2217743 9364465 7545776 6626389 582748 2065024 5750256 4779532 2252113 1801038 8137878 8256196 4625730 5036714 153774 861867 6215941 9781 536297 3237093 7716788 8600097 1451225 4674373 9152872 5870709 5518896 7847698 8432382 1576648 7217412 3438...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
54945097
26459107
30801917
31013061
24540801
45090129
32298180
37178553
36761910
61728020
30492360
29664331
42584258
54645350
50210876
39993929
47905183
18678749
55824065
27920188
35239152
17550430
51468388
23289246
40228873
58403522
51347592
30871037
49211501...

result:

ok 1002 lines

Test #50:

score: 0
Accepted
time: 560ms
memory: 1002372kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
5108280 2800454 8620317 9390361 8597198 3601618 538183 2571742 228289 2785888 4516939 8821082 813700 7040500 4507635 5473772 2161923 6788891 5151902 3858464 223204 3580203 3546632 1779304 9846087 2605701 6018438 3121506 4440584 9311701 1001033 240066...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
68268381
59717374
75126344
64413248
42233418
57507011
54805801
76876434
66684614
64567703
90306193
59210561
73390168
107425132
55635459
68728080
61192020
71474570
104164002
45913650
56326325
51324860
84987897
74770098
26478067
62924061
67349518
42467955
105457...

result:

ok 50002 lines

Test #51:

score: 0
Accepted
time: 415ms
memory: 1002600kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
2 3 3 9 1 2 7 9 4 2 5 10 3 8 9 8 10 8 2 8 1 2 4 10 5 10 6 6 4 9 9 1 8 8 9 9 5 4 3 8 4 9 7 2 7 2 10 3 4 6 9 1 4 2 6 1 4 4 6 7 4 9 9 3 4 8 6 9 2 4 2 3 3 4 3 5 7 8 4 2 5 10 2 2 7 2 2 3 1 7 8 10 3 1 4 9 6 8 4 6 2 2 2 7 9 9 1 5 10 10 9 10 2 4 7 4 10 8 6 9...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
16811244
18244099
9893687
18166787
16691745
19757429
17010574
19000536
16838588
18921029
16785269
4314467
16809329
3401553
10146084
19593049
19673119
16752186
19430367
17963404
17218384
17798001
17061249
4743176
17648946
1639850
16297845
19837494
19791180
1675...

result:

ok 50002 lines

Test #52:

score: 0
Accepted
time: 437ms
memory: 1002544kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
2 7 9 9 8 8 8 4 1 3 1 2 3 9 4 6 10 5 5 10 8 5 8 1 9 10 5 4 9 5 6 7 7 2 2 5 8 8 10 2 7 1 5 3 2 1 6 5 8 1 3 10 1 7 5 2 2 5 9 10 1 4 8 8 10 6 10 9 5 2 3 10 8 1 3 9 10 7 2 1 6 10 9 8 3 1 6 7 5 7 5 2 10 1 4 8 8 10 7 2 9 4 3 5 6 3 2 9 8 10 7 1 1 3 6 5 2 8 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
22092628
21904353
21150845
22278136
22991021
21596520
21307134
22165324
21094472
20077107
22092555
21959717
20434325
21851631
21912995
22126075
22092585
22416245
20611542
21543068
21335332
22092557
19822948
22092573
22092602
22584339
22319415
22092572
22711731...

result:

ok 50002 lines

Test #53:

score: 0
Accepted
time: 418ms
memory: 1002512kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
9222847 9222847 9222847 2249112 1451895 9222847 1451895 9222847 9222847 9222847 2249112 9222847 1451895 2249112 9222847 9222847 2249112 9222847 1451895 1451895 2249112 9222847 2249112 1451895 9222847 2249112 1451895 2249112 2249112 9222847 2249112 22...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
1147212492675
899534023768
1147212492611
1147212492677
469635803785
956931347669
1147212492690
258315578646
334553241573
1115611107208
275606212623
1090400922299
897570949564
1091668125269
919617075067
429744568616
17696855852
1140304039389
826542199702
101018...

result:

ok 50002 lines

Test #54:

score: 0
Accepted
time: 592ms
memory: 1002688kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
3278195 542274 169190 8726086 5454061 3115234 9861847 6189395 4715713 5349051 3327560 1580190 9969240 6117893 1002019 1867333 3780526 6865626 520837 5263724 9474191 4351220 7589244 4925304 3435866 2026994 2448583 3945167 3521 2064787 6460697 8833817 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
84476363
89464890
91307792
95452376
107967134
101558192
94025525
71599568
61200633
82243674
69398372
110103774
95352808
71435280
115028291
81550298
100968678
127867943
61807438
102372688
116372318
78324853
48962037
88649366
117707822
59854127
68109393
61930019...

result:

ok 50002 lines

Test #55:

score: 0
Accepted
time: 405ms
memory: 1002688kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
5 5 10 5 9 10 6 10 6 4 9 9 4 5 10 3 6 9 9 4 2 4 9 9 5 4 10 3 1 10 7 7 1 10 8 8 5 6 2 6 6 10 3 5 10 6 3 10 8 7 4 5 3 1 8 1 6 8 10 7 5 3 4 4 10 9 8 1 9 4 6 9 7 7 8 5 9 9 1 7 7 7 10 8 7 5 5 2 1 8 2 3 8 5 3 5 9 2 3 1 3 3 1 6 10 10 5 5 8 2 8 10 6 8 6 3 7 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
22287848
19444363
19827370
19594701
21829910
22377032
21101151
20758921
19181607
19431631
19688612
21424105
19286676
21319438
19857467
19348923
21415157
19756022
19722382
21071215
19682027
20690631
19811906
21402317
20584228
20501165
21451101
19370509
19619491...

result:

ok 50002 lines

Test #56:

score: 0
Accepted
time: 418ms
memory: 1002676kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 8550515 85...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
1712565548349
1712556997805
1712565548363
1712556997839
1712556997819
1712556997838
1712556997832
1712556997847
1712565548323
1712556997820
1712556997846
1712565548368
1712556997814
1711984113357
1712556997847
1712556997845
1712556997836
1712556997829
17125569...

result:

ok 50002 lines

Test #57:

score: 0
Accepted
time: 414ms
memory: 1002352kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
4 2 4 8 5 7 5 8 7 3 3 9 1 6 9 8 3 5 1 4 8 7 4 3 6 8 9 10 4 10 5 7 10 6 4 8 10 7 2 3 10 1 9 1 4 8 3 6 1 6 1 2 9 4 8 4 6 7 2 6 1 10 8 2 10 9 2 7 5 2 1 7 9 5 9 4 9 6 9 7 9 3 7 8 4 4 2 6 4 3 2 4 6 5 1 5 6 1 6 5 7 2 5 1 7 6 10 4 5 4 3 4 2 10 9 5 1 2 6 8 4...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
18239797
19473474
17542678
19927060
17707374
17564147
17825994
17732375
17832481
17945859
15366195
18141911
18157230
17747687
18246597
17639904
17779156
17508028
17810708
17624806
18118724
17686679
18146742
17916549
17468764
17863077
17756244
17625994
17846106...

result:

ok 50002 lines

Test #58:

score: 0
Accepted
time: 839ms
memory: 1002492kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
5 7 3 6 10 1 7 6 3 9 2 2 9 10 2 9 6 9 3 4 2 8 1 2 1 2 1 3 8 6 6 8 2 6 7 1 3 1 10 7 6 10 4 1 6 8 10 7 4 10 6 5 4 10 6 7 10 1 5 7 7 3 6 5 10 7 1 7 2 6 6 4 9 6 9 5 4 10 9 1 1 4 2 5 8 6 3 4 4 10 4 3 7 5 5 3 3 2 4 5 7 1 4 8 6 4 3 1 5 10 8 6 9 9 9 10 9 7 1...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
253909107
275559328
177314895
185043728
469343848
275224455
239766915
212422096
503707729
181891908
459880029
223072937
381907419
155653355
99073528
354477086
91723433
68796974
280693386
253909083
515907972
82656220
180928854
312255389
242018722
223071191
2127...

result:

ok 50002 lines

Test #59:

score: 0
Accepted
time: 973ms
memory: 1002592kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
399976 50000
2 5 5 5 17 17 17 65 65 65 257 257 257 1025 1025 1025 4097 4097 4097 16385 16385 16385 65537 65537 65537 262145 262145 262145 1048577 1048577 1048577 4194305 4194305 4194305 2 5 5 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
68456074049
3489840928
41119538238
40874011417
19193655327
30916365749
28200572285
62679905313
57885998416
18121352529
44876643273
3399823259
63506661023
23957541747
72273183200
73004433918
12867596090
20561897558
7521492878
53152112002
58677531697
45178106917...

result:

ok 50002 lines

Test #60:

score: 0
Accepted
time: 1632ms
memory: 1002760kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
399993 50000
2 3 5 9 17 33 65 129 257 513 1025 2049 6145 14337 30721 63489 129025 260097 522241 1046529 2095105 4192257 8386561 2 3 5 9 17 33 65 129 257 513 1025 2049 6145 14337 30721 63489 129025 260097 522241 1046529 2095105 4192257 8386561 2 3 5 9 17 33 65 129...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
8727093435
4958204288
1021809981
6436430080
5393730468
1775587592
3299894499
1943097839
10871171257
7822559282
8576455675
4874699006
804107290
11306691065
10687944402
5326836559
10854420514
1792338216
7891638393
8710342308
11222934408
1022317883
5766405520
105...

result:

ok 50002 lines

Test #61:

score: 0
Accepted
time: 2164ms
memory: 1002372kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
10000000 10000000 2 10000000 10000000 10000000 2 2 10000000 2 10000000 10000000 10000000 2 10000000 10000000 2 10000000 2 10000000 10000000 2 2 10000000 2 2 10000000 10000000 2 2 17 10000000 10000000 17 17 10000000 10000000 10000000 17 17 10000000 10...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
2673146378
9150968704
1571142355
209302
2323388034
9040821281
2272182948
8761257758
9151411633
9471101897
7758894692
1921277470
2673148441
2363226877
209175
2051903691
7949985210
1571193709
1571099594
8320297740
7928975472
2833987675
10774195595
5486163260
548...

result:

ok 50002 lines

Test #62:

score: 0
Accepted
time: 1324ms
memory: 1002772kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
10000000 2 2 10000000 10000000 10000000 2 2 10000000 2 2 2 10000000 2 10000000 10000000 2 10000000 2 2 10000000 2 10000000 9 10000000 10000000 10000000 9 10000000 9 9 10000000 10000000 9 9 10000000 10000000 9 10000000 9 10000000 9 9 10000000 10000000...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
1895599775
1513453254
3854798892
4918957156
4528553445
1743611099
4439968082
3556426504
2088853578
2470302605
4015279515
4296290522
3152343579
4867152849
3383926760
2470218775
1895601135
5412581780
3556408865
5692903387
6133949306
2126704422
653968929
21267047...

result:

ok 50002 lines

Test #63:

score: 0
Accepted
time: 1758ms
memory: 1002548kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
2 10000000 2 10000000 2 10000000 2 5 10000000 5 5 5 10000000 10000000 10000000 17 10000000 10000000 10000000 17 17 10000000 65 10000000 10000000 65 65 10000000 257 10000000 257 10000000 257 257 257 10000000 1025 1025 10000000 10000000 1025 10000000 4...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
1954018717
5550439899
4952701894
6296201406
3694828403
4491275810
4158995530
7683267290
4235405989
2187732669
3509381467
3694827711
3129469861
1502543113
4235407786
1934716483
1865158645
4491009084
3926155462
4235405013
7554037382
4358887855
1025029091
7574159...

result:

ok 50002 lines

Test #64:

score: 0
Accepted
time: 1617ms
memory: 1002568kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
400000 50000
2 10000000 3 10000000 5 10000000 10000000 10000000 10000000 17 10000000 33 65 10000000 129 129 10000000 10000000 513 513 10000000 10000000 2049 2049 10000000 4097 10000000 8193 10000000 16385 10000000 10000000 65537 10000000 10000000 131073 10000000 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
3319636846
2554132498
6385653792
5230069249
3349142628
2876935998
3629631757
2334983202
6042508496
4917498533
2393047798
3886139778
3168553962
3349143455
3626276336
5298724120
2553782012
3400924948
3349182655
3349143078
4136716515
3066033259
3065553383
2308546...

result:

ok 50002 lines

Test #65:

score: 0
Accepted
time: 1963ms
memory: 1002612kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
399994 50000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
120321110322
321501110306
176171110316
412291110320
380641110317
207681110324
197801110304
347181110324
502321110313
3491110305
20451110315
397901110306
69581110322
170271110303
81761110305
396791110320
337541110320
289821110311
178401110303
267521110315
41553...

result:

ok 50002 lines

Test #66:

score: 0
Accepted
time: 2064ms
memory: 1002304kb

input:

b50747e9-747c-4fca-b3b0-62317b32d2f6
399980 50000
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

f39eb8f7-7d10-4b4a-af02-d7aef3d4dd0a
OK
8912228793
43853347277
43600058220
10207821243
16561176689
4241176704
34892228809
21914465778
1123347284
14318939711
4254465778
26252228788
42881110309
12028939730
26917821244
38146702757
6505584265
55535584267
46935584250
36241176702
9574465781
37625584253
21...

result:

ok 50002 lines