QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#77073#5218. 字符串sdoi100 ✓473ms52940kbC++113.4kb2023-02-13 01:08:302023-02-13 01:08:33

详细

Test #1:

score: 10
Accepted
time: 3ms
memory: 5560kb

input:

300 300
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 0 0 0 0 0 3 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:

37
65
65
49
89
81
13
97
73
65
35
9
59
37
77
89
91
99
29
85
77
67
81
55
99
17
5
21
13
77
17
99
69
55
97
73
83
97
25
25
53
55
97
57
99
17
33
57
75
69
77
59
9
73
35
95
89
61
9
61
61
131
125
182
154
167
199
187
190
155
156
152
132
139
182
170
139
136
169
195
192
151
177
186
136
153
186
132
148
193
173
1...

result:

ok 193 numbers

Test #2:

score: 10
Accepted
time: 66ms
memory: 11204kb

input:

20000 10000
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 ...

output:

7829
9265
1953
6573
6057
663
3617
9361
3083
7179
7529
5457
9521
8069
2039
9745
6387
6565
4511
5481
5521
9349
9953
8233
5883
5841
1541
7913
8993
8945
7985
8701
5781
6349
9325
5507
5341
4767
4051
8305
2465
7809
5105
8101
5763
7355
5765
3537
2817
5355
5715
7585
4005
3429
2769
7001
7801
4095
3949
7455
5...

result:

ok 7497 numbers

Test #3:

score: 10
Accepted
time: 59ms
memory: 11228kb

input:

20000 10000
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 ...

output:

8745
5593
6297
5197
9985
2545
9793
5633
5747
9259
5951
8393
8873
8513
9649
3703
6767
9183
9761
4641
6037
6241
4805
7897
9187
9441
4245
9987
1043
7701
9457
8921
3595
9871
8151
9773
1505
4877
7867
4437
6049
4317
7837
3059
8215
9217
5817
8537
8121
4949
1239
8249
7373
7897
8717
2103
7537
9459
3703
1089
...

result:

ok 7507 numbers

Test #4:

score: 10
Accepted
time: 473ms
memory: 52940kb

input:

200000 30000
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5...

output:

48105
56009
65135
23351
57329
44865
39825
26603
50825
58161
39213
36027
67485
59153
62733
46217
26541
69441
59297
24953
46825
40449
33027
44585
29297
52013
57301
43421
34095
43993
68513
44507
62125
52845
63935
52955
43891
62525
40405
57121
22233
42597
63313
50653
26645
6217
59451
59741
49239
24745
3...

result:

ok 30000 numbers

Test #5:

score: 10
Accepted
time: 467ms
memory: 52356kb

input:

200000 30000
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5...

output:

62579
47205
49609
20253
59597
43011
61023
69777
16785
67707
68283
36559
11307
58705
29869
43875
61201
60545
51221
67185
49079
55145
14867
34921
44037
18129
22237
65677
51073
51841
39025
63349
20299
45379
8613
26241
20357
50541
48795
35673
66325
48177
55545
17087
33673
60823
50055
53603
60089
66925
2...

result:

ok 30000 numbers

Test #6:

score: 10
Accepted
time: 413ms
memory: 52912kb

input:

200000 30000
1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 0 1 0 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 0 1 1 1 1 1 1 1...

output:

75409
192357
134617
31333
28555
41015
111347
148163
180788
8834
176883
191492
65563
121357
176883
97659
97659
176883
163250
97659
50612
97659
176161
97659
97659
176161
176161
97659
97659
186590
50612
148252
50612
140945
97659
97659
97659
165173
97659
55518
97659
97659
97659
176161
106551
90620
16270...

result:

ok 15021 numbers

Test #7:

score: 10
Accepted
time: 392ms
memory: 52824kb

input:

200000 30000
0 0 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 0 1 1 0 1 0 0 1 0 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 1 0 0...

output:

22076
155846
154485
90310
155846
154954
155846
28024
155846
137994
127166
147549
139039
133000
147549
147549
178752
133000
29506
124189
145505
147549
38460
127166
147549
9716
147549
154740
147549
67464
26504
26504
67464
147942
9716
147549
133000
119620
67464
133000
147549
186188
9716
9716
147549
674...

result:

ok 15006 numbers

Test #8:

score: 10
Accepted
time: 362ms
memory: 52320kb

input:

200000 30000
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5...

output:

24349
13095
53797
69079
61467
66041
13313
64421
49077
36859
25585
34465
47905
23953
40841
63801
30141
53879
64033
23593
41265
21683
55853
31913
56497
59649
50577
66357
62329
35889
58361
29701
19637
61665
6487
54425
51049
27033
69489
59073
38015
62573
12577
24113
42433
69485
35591
66337
33619
48623
2...

result:

ok 22326 numbers

Test #9:

score: 10
Accepted
time: 352ms
memory: 52368kb

input:

200000 30000
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5...

output:

45565
37639
65091
57863
52945
57691
49545
56447
28895
50211
66561
51027
37489
54597
17553
26317
29241
32779
52073
66257
39585
68895
55939
50071
35357
65889
43997
20043
58881
58783
56221
66643
55897
58193
42729
1049
58847
30617
59243
32519
67073
46279
51121
63297
30759
47419
55137
15121
65851
57097
6...

result:

ok 22335 numbers

Test #10:

score: 10
Accepted
time: 358ms
memory: 52332kb

input:

200000 30000
1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 7 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 6 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 8 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5...

output:

10401
44761
54013
39499
52447
69307
38947
51371
38201
37689
42159
48527
68951
49849
34945
68207
59707
59387
37873
46705
46561
51469
29111
39835
63611
37979
54021
60555
55041
54545
24877
60057
39833
50983
30057
33001
38185
66587
63697
52661
47945
40319
53985
13131
37685
48863
55353
64967
42801
32537
...

result:

ok 22286 numbers

Extra Test:

score: 0
Extra Test Passed