QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#878809#9694. Light Drinking and Low Singingucup-team159#TL 1403ms7544kbC++2627.5kb2025-02-01 17:54:342025-02-01 17:54:40

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 3840kb

input:

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

output:

2
1
3
3
4

result:

ok 5 number(s): "2 1 3 3 4"

Test #2:

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

input:

5000 5000
11110100011000001111101011001001000111001111100101011101110100010011000011100110001001111101001100111111001000000100001001101101001001110010101000001101110001000000001101101110101100101010010011010111011110100011001111100101101100000100111100000100001001000100100110111010010110010101101110...

output:

2466
2321
2400
2359
2430
2377
2302
2430
2426
977
2408
2356
2389
2475
2332
2466
2466
2385
2362
2284
2357
2377
2403
2432
2397
2296
2327
2353
2409
2416
2344
2385
2388
237
215
2467
2277
351
2393
2358
2398
2396
2446
2375
2439
2314
2335
2461
2432
2136
2462
2365
2305
1468
2364
2397
2391
1407
2280
2312
986
...

result:

ok 2535 numbers

Test #3:

score: 0
Accepted
time: 16ms
memory: 3968kb

input:

5000 5000
01101001101111100000101011101110001000101100000110001111010010110001011001111101000001100110010100000100111010111001111110000101000100110100011001010101011100011100001011000101100000101010000101111101111111101011001101001011001101101001001011010100111001101010000110011001001001110011100101...

output:

1468
496
1548
277
1632
162
651
1336
73
24
315
1032
1258
1056
395
142
113
950
554
145
155
290
1160
1001
2009
879
1169
1160
142
261
560
1715
281
1688
1061
1858
228
869
707
1509
1293
1338
58
695
451
1271
736
374
856
320
2118
741
1111
1821
838
67
459
273
1888
1606
2076
2248
325
352
60
765
452
677
705
99...

result:

ok 1618 numbers

Test #4:

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

input:

5000 5000
01010101110000011010001101100111011100111111101011010011111111111111111111110001110100111010111110110100110101101111101010100110100000001011011011111000111011101011000111011110100010100000110011111100111110011100111000010100100111110010011111011110111011110110010011011000101011101001110110...

output:

271
441
2171
715
507
462
1218
2090
1977
1289
966
2184
541
1574
155
240
531
874
132
621
2034
2045
1177
602
1987
1221
1161
951
1863
643
654
348
362
706
228
376
1221
436
861
962
93
205
49
223
20
1148
1682
765
401
492
1018
1547
451
1351
1554
94
132
269
1448
355
41
110
851
580
582
531
642
675
1079
374
19...

result:

ok 469 numbers

Test #5:

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

input:

5000 4999
00000111110101110011101000000011101111110000101111011000011111111011011111011110010111000010000111010011000110000010110101011100101001000011001110110111111011000110010010001111110011011111000011101110110011001010111000000000100100001001011011000110100010111110001010000000110100110100110101...

output:

2265
2381
2376
2356
325
1636
1908
2321
2279
2320
2265
2388
2315
2232
2393
2341
2349
2347
427
131
2416
2295
2324
2262
2250
2258
2319
2408
2432
2319
2247
2278
2311
2370
2416
2303
2266
2307
2411
453
2293
2397
2335
2406
2346
2442
2350
2299
2386
2260
875
2307
2368
2292
2271
2400
2319
2220
2287
1377
2454
...

result:

ok 962 numbers

Test #6:

score: 0
Accepted
time: 16ms
memory: 3968kb

input:

5000 5000
11010110011001001000101000010011011000100000110010010000101111101001011111111000110100101001000010110110100101011101011100001011001001100110110110111111101011011111000011010100011000110011000100011101110100010100101011000110001110010011101100101110011110111001000111000011000010110110100000...

output:

1116
131
1373
1062
66
299
1568
1261
160
1301
550
467
449
1704
354
823
192
320
1134
203
1240
782
1853
888
1789
1605
285
1505
835
1282
1289
205
594
534
329
566
625
2093
1221
665
1898
741
389
1298
587
1638
1350
1312
1259
763
1166
423
239
1164
978
171
186
1346
122
1945
1427
27
889
659
1189
228
1266
601
...

result:

ok 1714 numbers

Test #7:

score: 0
Accepted
time: 468ms
memory: 4224kb

input:

100000 100000
1010111101101111001100000010000100110010010011000110000000010011010110001101000100001110110101100001100111101101111110110000011011100010111110000100110000010110101111001100100010001110000000101100110010101010111111001101101011010111001110100000111000111000010010011000101100000010001011...

output:

47842
46846
48368
47330
44883
30907
45125
46978
48287
45607
47272
48264
46522
46124
7713
46192
18370
47011
45153
47233
47274
47423
46410
46134
45765
12207
48753
46849
46265
47659
45767
44721
47589
46886
48378
47080
47247
47348
45381
46247
47667
47183
36147
46243
47095
45124
47416
47759
48585
46426
4...

result:

ok 50007 numbers

Test #8:

score: 0
Accepted
time: 435ms
memory: 4224kb

input:

100000 100000
0010100011101111010011101011110101010010101101010010000011001001101010111000010011001100101010011011001101001001110110100111000011011111101100001000000010000010111111001011110011101101111000000010100011110100111110011100011011011101011110111011001000010111011001011110110010000110011001...

output:

19281
15283
8968
21483
32334
9834
24591
5318
8121
4330
22541
13624
30119
32112
2613
2870
39296
12817
8403
37626
6927
35523
6347
24985
25193
6083
20350
24832
6959
3292
24789
2154
8721
11082
19751
16854
15838
8316
24445
12384
10923
2167
11725
16055
2653
24931
134
18763
6877
22840
1948
14018
646
21088
...

result:

ok 33292 numbers

Test #9:

score: 0
Accepted
time: 581ms
memory: 4096kb

input:

100000 100000
0110110110010011110001110100011000110100000110001011011000001110010100011100101010110111100110001110101011110111001101001010101110111100101100011010110100001100000111000010011011101110101010110111011000101000101101111101110100101011110000001001110100011111001010111110001001100011001101...

output:

18179
3895
3149
33066
24791
22741
6230
38086
18983
30223
36165
22946
5101
8434
22117
35921
26044
10367
24945
6545
3455
9131
15179
33860
39454
6360
12397
13746
39203
26060
3801
7519
22091
18297
6902
44079
41025
27675
3980
40801
471
532
12579
1894
26726
14915
16213
32392
5753
29376
13557
15843
16204
2...

result:

ok 9925 numbers

Test #10:

score: 0
Accepted
time: 579ms
memory: 4224kb

input:

100000 100000
0100000010001101000110010000010000000100111010001010001110011010010101101001001001110101011011001100001101101100011010011010101110000000110111100010001101110000111111100011100010001010101101110111101111011100100001000101000010001111010010101010010100110011011110101000100101010101001011...

output:

24763
18735
16434
4073
4529
20736
26025
36937
25996
8048
1002
15135
13055
33167
2943
7524
30258
4757
23073
27177
6637
30585
13087
43042
1168
6648
27610
4851
4904
20309
26844
19868
20243
12185
24095
46660
8723
29984
45234
32389
40350
61
13272
3439
7371
17288
2698
23073
7255
14134
29129
8481
17573
215...

result:

ok 10053 numbers

Test #11:

score: 0
Accepted
time: 480ms
memory: 4224kb

input:

100000 100000
1010001100010101110000110001001101110110010000001001100000100000100010011100111110110011001101011100011010011000000000111001000101100010010100110101000011111101011100101111001011000100010000110110001111011101000010000010010010111011101001000101100111101000011010001100101101010111000000...

output:

48553
48288
47447
45205
47392
48936
48441
48959
45819
46172
49267
46319
48209
46354
48844
9496
47741
46237
47845
46369
47745
48054
48191
46374
49091
46982
46380
48552
49094
47631
47119
49310
47220
46722
47260
47769
47454
49257
47607
45596
48071
49115
48113
45702
46861
47501
47942
48186
47383
47571
4...

result:

ok 49999 numbers

Test #12:

score: 0
Accepted
time: 583ms
memory: 4096kb

input:

100000 100000
0110110101101110101000011001010011110101100000100101011101010011010111011111100000111011000001101001010011000001001001100101001100100001110101011011001001111010100111111101110101111110101010100100100010000000101000111111010010000011011111010000001101001111111101100011111011001110000010...

output:

2045
7780
5107
1720
12599
514
27707
41603
10836
8562
39110
8571
1902
34129
36383
4278
8874
34187
12920
31949
5782
1196
419
32835
13614
37935
6864
4730
2579
9793
20147
43092
39829
35373
825
8949
548
9812
8186
15630
23661
13684
7216
23486
22255
4089
36874
11290
7340
40919
23485
861
19257
20333
31322
1...

result:

ok 10013 numbers

Test #13:

score: 0
Accepted
time: 436ms
memory: 4224kb

input:

100000 100000
0000101011111110010000110001001001110101111001010000000001100000011001101110110111100010101110000111100111111010000100001111100111100111011101100110001110011100000101101010111101000000100110101001110100101111110101011100010110110010110000110110101011010110101100011101110110000010111011...

output:

23921
1563
11291
1899
11512
28605
27883
27555
11102
44268
19792
16512
28082
10321
2800
24950
17892
19926
22181
1985
774
1056
6845
28972
4467
17005
20298
16522
27890
11147
29921
4106
6797
19695
22246
2655
22699
12583
13595
376
1009
6771
28862
14368
5101
1167
1749
8744
30946
24437
35891
26586
1697
559...

result:

ok 33387 numbers

Test #14:

score: 0
Accepted
time: 1119ms
memory: 7388kb

input:

2000000 250000
010001001010100100111010101000100110110101110100110101000011110000011000110010000111010111010000101100100000111010010101100100111101000010111010110110010111011110011010111101101001011011010010011110000010101110110011100010110010111101000110101111001111000100101000110100000111001000110...

output:

9988
9957
9998
9951
9657
9929
10017
9883
9985
10022
10033
9989
10052
9817
10011
9958
9950
9971
9883
9982
9969
9826
10032
10123
9936
10030
9841
10065
9928
9825
9954
10115
10096
9930
10037
10024
10011
9956
9921
9754
10125
9968
9986
10050
9972
9979
10145
10187
9974
9919
9976
10053
10118
9971
9599
9935
...

result:

ok 83012 numbers

Test #15:

score: 0
Accepted
time: 1373ms
memory: 7544kb

input:

2000000 250000
000001001011000110011000011000001101100110000011000011110111001011111000100010101001010100001110100110100011000111110010100010010101111001101110110110010100001110111111000001010000100111010010001100101011110010010110100010001000010001100111010101001011100110101111110110010001100100111...

output:

4306
802
5985
5252
9840
9147
2451
8180
4001
5966
5553
7734
9758
8984
2585
9373
7240
7618
3067
5271
9156
5040
2674
1549
3395
6762
7044
1133
6103
6040
4734
829
7362
7014
8158
8986
8500
2298
5149
2795
3951
3998
2142
2299
4719
8011
3847
2369
518
5575
8069
2853
2123
1289
4510
4315
6098
1505
1762
4000
695...

result:

ok 25043 numbers

Test #16:

score: 0
Accepted
time: 1113ms
memory: 7412kb

input:

2000000 250000
110011110100011111010011001100110100000010110011110100110100001110000100011100000100010100011001111111001110011001101101010101111010010011101011000001101111100011101110010010100011101100000111110001101000100110001100110010010001011100110111111100110100000011011000110001111110110000010...

output:

9952
9917
9975
10170
10112
9865
9952
10004
9916
9921
10024
9890
10013
9905
9966
10019
9926
10021
9989
10125
9970
10066
9930
10063
9964
9998
10050
10104
9933
9866
9975
9975
10153
9901
9976
9921
9896
9948
10074
9958
9920
10005
10121
10024
10135
10008
10052
9972
10009
9941
9921
9956
9928
10006
10024
10...

result:

ok 83315 numbers

Test #17:

score: 0
Accepted
time: 1403ms
memory: 7540kb

input:

2000000 250000
100110100111101101000011101110100111101101110101101111111101010100110110101010010110110010111011001001101011101001010111001110000101000011001000110111100000111000000010011100110111011101110010100101010101101011100111011100001111010001101011010001000111011101101001111100101001111011000...

output:

6944
9209
3806
9503
4745
8000
8785
5648
5552
423
6704
7036
4373
3150
4391
7936
3668
6881
5295
4845
512
9044
2064
2610
8713
4202
6361
2224
9612
6103
2818
2631
9125
6011
8110
4877
4042
9542
7829
5154
2456
3024
2649
1015
3458
80
5294
7217
8454
3061
8680
3428
5440
6031
9292
1743
7740
4042
4065
9264
7228...

result:

ok 25202 numbers

Test #18:

score: 0
Accepted
time: 1397ms
memory: 7408kb

input:

2000000 250000
100011100011101001010100110000100011101110001100111100111110011000010111100000000110010111110011110000010101011101111110010110010101010010111101101110000101111000000010110001011111010100111101101111100011101111110011001001101000111010001010001011101010010010010101111110010010001000111...

output:

1211
8852
4077
8478
3273
7964
908
1248
6399
1492
7646
3207
9283
4397
8594
8728
1189
3993
2463
6253
2037
1826
1029
9219
5783
8349
7326
620
1609
2589
2822
4868
8075
3179
1827
8010
8689
4968
9028
8273
5148
1088
3953
9860
7721
6765
5309
7085
7468
6094
6932
9403
7743
1708
6123
5770
2400
7606
2567
3213
88...

result:

ok 25160 numbers

Test #19:

score: 0
Accepted
time: 1376ms
memory: 7540kb

input:

2000000 250000
101101001000111100010010100001110010011110000011111110000110111010100110100111111011110100110010000100011001100101100111000000000010000011111001000111111111010101000011111000101000111010101011100110000110100000000011011011100001100000101101100100000001011000110010010110010011000011010...

output:

7296
495
6928
7777
4023
2574
3048
2896
9031
1009
7401
8313
4779
9188
1376
6357
3352
4592
6123
827
4767
5400
9756
8451
8478
9441
5389
8367
2362
6670
3023
715
6492
3373
6755
4650
7924
1919
8724
8741
3266
9939
2864
2870
6654
9064
249
4764
5933
7958
6082
9411
73
6915
3733
4679
569
4355
1875
8959
3125
87...

result:

ok 24976 numbers

Test #20:

score: 0
Accepted
time: 1115ms
memory: 7452kb

input:

2000000 250000
111011010101101010111011010101011001010101101111000100100001101110110100101011010000111101101000011010100100000101110011100011100001011111011100001010000101001100100010001010100100011111001101010011001011111111010000001000011101011000101010000101011100111110110011100100111111101011011...

output:

9948
10088
9969
10031
9951
9880
9906
9867
10067
9942
10126
10057
10003
10011
10119
10027
9953
9961
9942
10023
9999
10088
9939
10211
9948
9984
10036
9835
10018
10022
10003
9909
10049
9896
9871
9974
10024
10063
9884
9948
10113
9953
9981
9960
9961
9998
9952
10005
9981
9873
10272
9970
10027
9895
9903
10...

result:

ok 83270 numbers

Test #21:

score: 0
Accepted
time: 1357ms
memory: 7540kb

input:

2000000 250000
110001001001011101101010011111000111011000000010010100001001101001011001100011011010100101010000011011111011110001100111100101100111101001001111000111011001001010001010011111101001101100100010110111111110100111111110110101001100001001010100011001111110001110100011111001100010101001000...

output:

7041
7674
7455
1930
1104
1393
6202
4110
4614
2333
3536
1671
3513
3990
2823
2713
4215
6841
1686
7105
9034
6258
8901
5883
916
8156
53
3278
8069
5324
7093
4529
7889
12156
9108
6136
4690
2972
1834
3828
6257
4010
9297
2836
4927
3056
2847
9427
8380
5394
7938
3392
3057
6207
2504
2720
9332
7204
6409
6401
65...

result:

ok 24953 numbers

Test #22:

score: -100
Time Limit Exceeded

input:

500000 250000
1111101011001010010100101000011010100010111001010000111111101110101011110100000111011110110000011111011110011100000011001000011111111001011001011111100111100010101111110010100111001001010010010000111111110010000010111001010100001101110000111000110110111100000001001010010011111101011010...

output:

237727
233190
244648
236278
234555
231659
229556
235186
234086
232289
242921
249138
244309
241476
242105
237592
239457
237827
238624
238947
248129
246940
241555
237633
236304
238903
242486
239257
240908
248226
243251
234627
231355
229657
236793
242926
243963
247672
234320
230787
232233
58071
234012
...

result: