QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#115074#5812. MarblesGuanYunchang39 ✓38ms8264kbC++173.3kb2023-06-24 16:02:122023-06-24 16:02:14

詳細信息

Subtask #1:

score: 7
Accepted

Test #1:

score: 7
Accepted
time: 2ms
memory: 3824kb

input:

50
14
l c c i l i g g e e h o h f o f d d m m b b n n k k j j
20
n r q b i b i r n q k u o j c p m l m l d e d e h t h t p j c u o g k g s f s f
12
j k b l g d i h f e m c g l b k j c m e f h i d
18
s n o m m j o n d s f d f p p j e q i g q c g i e c h r l h b k l k r b
12
i e i e j m b h b j h m k ...

output:

Case #1: 2
Case #2: 8
Case #3: 12
Case #4: 5
Case #5: 4
Case #6: 3
Case #7: 2
Case #8: -1
Case #9: 2
Case #10: 4
Case #11: -1
Case #12: 10
Case #13: 4
Case #14: 5
Case #15: -1
Case #16: 3
Case #17: 2
Case #18: 6
Case #19: 2
Case #20: 5
Case #21: -1
Case #22: -1
Case #23: 5
Case #24: 4
Case #25: 2
Ca...

result:

ok 50 lines

Subtask #2:

score: 32
Accepted

Test #2:

score: 32
Accepted
time: 38ms
memory: 8264kb

input:

50
500
fl sr ec fl fn ec eq fn qb eq cf qb rk cf tf rk tk tf j tk qc j af qc vc af ul vc br ul rr br pd rr zm pd nq zm re nq gi re hr gi sh hr ip sh nl ip pg nl ih pg yj ih ss yj ck ss or ck qp or ol qp nh ol jb nh is jb gg is di gg pp di sn pp mn sn zn mn vp zn wp vp bi wp pm bi zr pm ao zr kf ao i...

output:

Case #1: -1
Case #2: -1
Case #3: 4
Case #4: 5
Case #5: 20
Case #6: -1
Case #7: 51
Case #8: 21
Case #9: 11
Case #10: 33
Case #11: 28
Case #12: 28
Case #13: 19
Case #14: 72
Case #15: 47
Case #16: 5
Case #17: 26
Case #18: 12
Case #19: 13
Case #20: 77
Case #21: -1
Case #22: 43
Case #23: 18
Case #24: 20
...

result:

ok 50 lines

Extra Test:

score: 0
Extra Test Passed