QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#715974#2978. 二进制Urd100 ✓91ms34424kbC++172.6kb2024-11-06 13:58:042024-11-06 13:58:04

详细


Pretests


Final Tests

Test #1:

score: 10
Accepted
time: 0ms
memory: 3672kb

input:

100
1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
100
1 31
1 51
1 95
2 22 85
1 81
1 87
1 27
2 20 71
2 64 68
1 19
2 62 91
1 41
1 37
1 82
2 32 61
1 ...

output:

1199
882
6
275
310
986
1710
1151
230
140
1620
3191
115
175
539
738
149
208
1455
1137
3
2415
808
401
987
107
326
1954
1129
2
71
155
400
1220
478
1
2782
58
1555
1786
513
1
24
28
2651
1791
4
1788
1658
2973

result:

ok 50 lines

Test #2:

score: 10
Accepted
time: 1ms
memory: 5696kb

input:

100
1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 1 1
100
1 81
2 6 81
2 17 37
1 75
2 41 77
2 15 55
2 2 73
1 36
2 41 51
1 30
1 44
1 14
2 64 66
1 65
2 1...

output:

2702
175
600
730
2401
39
3
143
76
4
467
1911
251
102
1738
1261
857
155
206
1572
446
63
83
384
965
2178
339
99
148
965
398
372
480
6
1154
295
847
208
1205
188
60
13
248
805
32
34
27
41
4
1812
179
1752
394
89
1247
15
653

result:

ok 57 lines

Test #3:

score: 10
Accepted
time: 4ms
memory: 6804kb

input:

5000
1 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 0 1 1 0 1 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0...

output:

138313
9253372
1072935
2796351
463603
150678
424012
5448091
2019776
169872
998104
225095
843621
144714
663560
1741
636093
4419188
4437050
5036832
3548
307296
1787821
3508482
9914289
17107
473164
1230732
1453509
6982300
2042150
17405
3513670
952005
7072241
35056
816606
1614491
1059690
6918897
11727
5...

result:

ok 2519 lines

Test #4:

score: 10
Accepted
time: 4ms
memory: 7344kb

input:

5000
0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0...

output:

1723675
4217973
32172
9620816
5615
2791439
435297
269972
37113
3949985
3398
1017589
2566165
18645
3590104
7541248
6335597
1244567
596709
5711166
435592
235
184989
2898627
31706
505950
331995
4308812
4916567
1180731
1895036
2225361
4368324
4581
2154618
12291
5270406
7192481
3665464
65074
527084
43807...

result:

ok 2531 lines

Test #5:

score: 10
Accepted
time: 4ms
memory: 7224kb

input:

5000
1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1...

output:

3921596
2192199
6057416
7090532
606485
1214849
840930
1375851
191666
1443260
32221
6971444
253801
1005232
2345473
233193
304078
920471
164225
2776
6903246
3297113
3500366
1914766
4120
632403
6855317
50701
2033584
695419
4059829
30329
160039
738366
710082
8034
927053
900660
1326915
915928
8169177
258...

result:

ok 2564 lines

Test #6:

score: 10
Accepted
time: 82ms
memory: 31488kb

input:

100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1...

output:

206608787
253007857
439731195
185047227
188857704
24613036
47206590
131011322
254022079
256643949
212830
14238695
422351471
3549220
83008
2233353
25039373
287177926
180026102
2188020
53410563
109374346
35617395
10199860
47571941
1223396
7807076
81132736
24620330
103077262
1699996
33242440
88076
4053...

result:

ok 49968 lines

Test #7:

score: 10
Accepted
time: 77ms
memory: 34392kb

input:

100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1...

output:

260358454
55065580
29518910
81784574
270381057
167067315
5531234
159684297
63691800
28082838
22088076
114523821
930
18797397
142796499
97365574
45627502
554640
12600654
553264
159975686
6177344
71911304
20283046
51381044
72893295
11427263
611280
973574
196039063
272732079
77841039
80350327
7468980
3...

result:

ok 49996 lines

Test #8:

score: 10
Accepted
time: 84ms
memory: 30936kb

input:

100000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

8458028
5377
7686798
263467832
26669822
122676085
263384718
2977523
277663848
188270481
110833174
37252968
77919454
194600202
2031997
292252197
37256625
486339
13839224
647430
63185086
119320644
60278841
183009574
382492375
63116814
134461275
332592025
494693443
51563831
10201530
17366560
300667611
...

result:

ok 49974 lines

Test #9:

score: 10
Accepted
time: 81ms
memory: 34424kb

input:

100000
1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0...

output:

276416474
180032219
39634032
73514059
39554001
75880
51023324
15259409
205925
49993399
30872953
3282613
95541623
214191958
5473462
97192521
80548931
110838933
202217530
19679935
46515883
148309812
91967251
4308106
678454
6673596
110949831
45288085
6035081
29210177
5521453
59607124
227558749
14556108...

result:

ok 49952 lines

Test #10:

score: 10
Accepted
time: 91ms
memory: 31784kb

input:

100000
0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 1 1 0 1 1 0 1...

output:

69336373
139227185
194359113
222223893
21424562
503983
34969487
1906883
3745353
50079411
10533722
124771527
18855693
201722417
80263790
62406123
82213702
1260718
21740050
7042237
402653547
75915224
74822406
58006686
13209674
339638241
28064732
31244125
90383100
194319661
80428375
27135833
24053651
2...

result:

ok 50009 lines