QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#194688 | #6364. The Most Expensive Gift | ZhangYiDe | TL | 568ms | 4128kb | C++20 | 1.3kb | 2023-09-30 21:44:58 | 2023-09-30 21:44:59 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
Test #1:
score: 100
Accepted
time: 5ms
memory: 4064kb
input:
11 abcabacbcac
output:
18
result:
ok 1 number(s): "18"
Test #2:
score: 0
Accepted
time: 4ms
memory: 4028kb
input:
10 aaaaaaaaaa
output:
100
result:
ok 1 number(s): "100"
Test #3:
score: 0
Accepted
time: 4ms
memory: 4080kb
input:
10 aabbbabbba
output:
36
result:
ok 1 number(s): "36"
Test #4:
score: 0
Accepted
time: 2ms
memory: 4112kb
input:
10 acaabbacbb
output:
16
result:
ok 1 number(s): "16"
Test #5:
score: 0
Accepted
time: 4ms
memory: 4076kb
input:
10 abbabaabba
output:
25
result:
ok 1 number(s): "25"
Test #6:
score: 0
Accepted
time: 5ms
memory: 4064kb
input:
10 abcbcacabb
output:
16
result:
ok 1 number(s): "16"
Test #7:
score: 0
Accepted
time: 1ms
memory: 4028kb
input:
10 cbccbcbccb
output:
36
result:
ok 1 number(s): "36"
Test #8:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
10 abaabaabaa
output:
49
result:
ok 1 number(s): "49"
Test #9:
score: 0
Accepted
time: 4ms
memory: 4060kb
input:
10 abaabaabaa
output:
49
result:
ok 1 number(s): "49"
Test #10:
score: 0
Accepted
time: 4ms
memory: 4112kb
input:
10 bcbcbcbcbc
output:
50
result:
ok 1 number(s): "50"
Test #11:
score: 0
Accepted
time: 4ms
memory: 4028kb
input:
10 aacacbaaca
output:
36
result:
ok 1 number(s): "36"
Test #12:
score: 0
Accepted
time: 5ms
memory: 4128kb
input:
10 aaaaaacaab
output:
64
result:
ok 1 number(s): "64"
Test #13:
score: 0
Accepted
time: 4ms
memory: 4116kb
input:
10 acacacacac
output:
50
result:
ok 1 number(s): "50"
Test #14:
score: 0
Accepted
time: 0ms
memory: 4024kb
input:
10 abacabacab
output:
25
result:
ok 1 number(s): "25"
Test #15:
score: 0
Accepted
time: 1ms
memory: 4040kb
input:
10 aaabaaabaa
output:
64
result:
ok 1 number(s): "64"
Test #16:
score: 0
Accepted
time: 5ms
memory: 4112kb
input:
10 ababacabab
output:
32
result:
ok 1 number(s): "32"
Test #17:
score: 0
Accepted
time: 4ms
memory: 4028kb
input:
10 aaaaabaaaa
output:
81
result:
ok 1 number(s): "81"
Test #18:
score: 0
Accepted
time: 0ms
memory: 4112kb
input:
10 aaaaaaaaaa
output:
100
result:
ok 1 number(s): "100"
Test #19:
score: 0
Accepted
time: 4ms
memory: 4076kb
input:
10 aaaaaaabaa
output:
81
result:
ok 1 number(s): "81"
Test #20:
score: 0
Accepted
time: 0ms
memory: 4068kb
input:
10 abacabacab
output:
25
result:
ok 1 number(s): "25"
Test #21:
score: 0
Accepted
time: 6ms
memory: 4076kb
input:
100 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
10000
result:
ok 1 number(s): "10000"
Test #22:
score: 0
Accepted
time: 10ms
memory: 4120kb
input:
100 abaaabaabaabbabbabbaaabbbbbbabbbababaaaaabbaaabbbababbbaabaabababababbbabaaaababaababbabbbabbbabaabb
output:
2704
result:
ok 1 number(s): "2704"
Test #23:
score: 0
Accepted
time: 16ms
memory: 4068kb
input:
100 ccbcbcccbcbbbabaabcacbbabbbcbcbcbabbbababbcbaccaacbaabbbccccbcbabcbbcacbbbcaacababbacbaaaaacbaaaacbc
output:
1681
result:
ok 1 number(s): "1681"
Test #24:
score: 0
Accepted
time: 9ms
memory: 4044kb
input:
100 abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabba
output:
2500
result:
ok 1 number(s): "2500"
Test #25:
score: 0
Accepted
time: 15ms
memory: 4116kb
input:
100 abcbcacabbcacababccababcbcabcacababccababcbcaabcbcacabcababcbcaabcbcacabbcacababcbcacababccababcbcaa
output:
1156
result:
ok 1 number(s): "1156"
Test #26:
score: 0
Accepted
time: 10ms
memory: 4108kb
input:
100 acaacacaacaacacaacacaacaacacaacaacacaacacaacaacacaacacaacaacacaacaacacaacacaacaacacaacaacacaacacaaca
output:
3844
result:
ok 1 number(s): "3844"
Test #27:
score: 0
Accepted
time: 10ms
memory: 4052kb
input:
100 abaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaabab
output:
4096
result:
ok 1 number(s): "4096"
Test #28:
score: 0
Accepted
time: 9ms
memory: 4040kb
input:
100 abaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaa
output:
4489
result:
ok 1 number(s): "4489"
Test #29:
score: 0
Accepted
time: 6ms
memory: 4028kb
input:
100 bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc
output:
5000
result:
ok 1 number(s): "5000"
Test #30:
score: 0
Accepted
time: 16ms
memory: 4080kb
input:
100 bacccbacacbcbababbcabbbbbabacbabcbaacbbbbbbaabbbcbabcbbbbcabbcababccbcbabbcbbbaacbccbbabbbbbbbacbbbb
output:
3136
result:
ok 1 number(s): "3136"
Test #31:
score: 0
Accepted
time: 12ms
memory: 4116kb
input:
100 bcabbabbcbbbbbbbbbbbbcbbcbbbcbbbbbbbbbcbabacbabababbcbbbbbcbbabbbbbaabbbbbbbbbbbbbcbbbbbacabcbbbbbbb
output:
5776
result:
ok 1 number(s): "5776"
Test #32:
score: 0
Accepted
time: 9ms
memory: 4116kb
input:
100 abababababababababababababababababababababababababababababababababababababababababababababababababab
output:
5000
result:
ok 1 number(s): "5000"
Test #33:
score: 0
Accepted
time: 15ms
memory: 4096kb
input:
100 cbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbca
output:
2500
result:
ok 1 number(s): "2500"
Test #34:
score: 0
Accepted
time: 12ms
memory: 4036kb
input:
100 aaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaaaaaabaaabaaabaaacaaabaaabaaabaaacaaab
output:
5776
result:
ok 1 number(s): "5776"
Test #35:
score: 0
Accepted
time: 11ms
memory: 4020kb
input:
100 ababacababacababacababaaababacababacababacababaaababacababacababacababaaababacababacababacababaaabab
output:
2916
result:
ok 1 number(s): "2916"
Test #36:
score: 0
Accepted
time: 7ms
memory: 4064kb
input:
100 aaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaa
output:
7056
result:
ok 1 number(s): "7056"
Test #37:
score: 0
Accepted
time: 4ms
memory: 4012kb
input:
100 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
output:
10000
result:
ok 1 number(s): "10000"
Test #38:
score: 0
Accepted
time: 7ms
memory: 4076kb
input:
100 aaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaa
output:
7744
result:
ok 1 number(s): "7744"
Test #39:
score: 0
Accepted
time: 11ms
memory: 4080kb
input:
100 abacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabac
output:
3364
result:
ok 1 number(s): "3364"
Test #40:
score: 0
Accepted
time: 55ms
memory: 4028kb
input:
1000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
1000000
result:
ok 1 number(s): "1000000"
Test #41:
score: 0
Accepted
time: 59ms
memory: 4028kb
input:
1000 bababbbababaabbbbababaaabbabbaabaabbabbbbbbbabbbabbbababbbbabaabbbabbaaaaaabbaababbbabbaaaabaababaaabbbbbaabaabbaabbaabbabbbabbbaaaaabbabbbbbbabaaaaabaaabaaabababaaaaababbbaabbaaaaabbbbaabaaaaabaabbaaabbabbbbababbabbbaaaaaaaabbbababaaabaabaabbaababaaabbababbaaaabbbaaabbbaabbababbaaaaabbbaababab...
output:
260100
result:
ok 1 number(s): "260100"
Test #42:
score: 0
Accepted
time: 158ms
memory: 4052kb
input:
1000 acbbcacabacccbabcabccccccbaabccaccbcbacccabbaaacbcbbaccbcabcaacbbbbcccabcccbacccabbbcaaacbaabbaccacaccabbbbbbbacaabaaaacaaaaaaabccabbcaaaaabcacabbacacacaaabccbaabbbaccccaaaabbaccbacabccacbbbacbabcabaaacbcacabacbacbaaaabcbcaaaccacaaabbabaabbcaccbcccbccabcabaccbcccbbacbbaabccabccacabbcabccabaaabb...
output:
116964
result:
ok 1 number(s): "116964"
Test #43:
score: 0
Accepted
time: 52ms
memory: 4080kb
input:
1000 abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaa...
output:
250000
result:
ok 1 number(s): "250000"
Test #44:
score: 0
Accepted
time: 152ms
memory: 4112kb
input:
1000 abcbcacabbcacababccababcbcabcacababccababcbcaabcbcacabcababcbcaabcbcacabbcacababcbcacababccababcbcaabcbcacabcababcbcaabcbcacabbcacababcabcbcacabbcacababccababcbcacababcbcaabcbcacabbcacababcabcbcacabbcacababccababcbcabcacababccababcbcaabcbcacabbcacababccababcbcaabcbcacabcababcbcaabcbcacabbcacaba...
output:
111556
result:
ok 1 number(s): "111556"
Test #45:
score: 0
Accepted
time: 57ms
memory: 4016kb
input:
1000 abaababaabaababaababaabaababaabaababaababaabaababaababaabaababaabaababaababaabaababaabaababaababaabaababaababaabaababaabaababaababaabaababaababaabaababaabaababaababaabaababaabaababaababaabaababaababaabaababaabaababaababaabaababaabaababaababaabaababaababaabaababaabaababaababaabaababaababaabaabab...
output:
381924
result:
ok 1 number(s): "381924"
Test #46:
score: 0
Accepted
time: 56ms
memory: 4052kb
input:
1000 abaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaababaabaabaabaaba...
output:
413449
result:
ok 1 number(s): "413449"
Test #47:
score: 0
Accepted
time: 56ms
memory: 4080kb
input:
1000 abaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaa...
output:
444889
result:
ok 1 number(s): "444889"
Test #48:
score: 0
Accepted
time: 56ms
memory: 4060kb
input:
1000 bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcb...
output:
500000
result:
ok 1 number(s): "500000"
Test #49:
score: 0
Accepted
time: 142ms
memory: 4112kb
input:
1000 cabaccccbbbaccaccbccbccbbbaccbcccbccbbcacabcaccacaccaacbcbacbcbcabbbbcaccabbcccbacaabccbbccacccbbccbcbbbbcccaccbbbcbcbcccacbcacaaacbbbcbcccaacbbbbcacacbccacabcbbccaababccbccbccbcacabcacaacccbcbcbbcaccccbbacccccacbcacaccbabccccabcacccabbacaccccbcccccaabcccaccabcccacaccacccbbaabcccccccaabcabaccab...
output:
267289
result:
ok 1 number(s): "267289"
Test #50:
score: 0
Accepted
time: 113ms
memory: 4040kb
input:
1000 bcccacccabcabacccccccccccccabccacccccccbbacaccaccccaacacccccccaaccbaacccbccaccaaccbccaccaacbcccccbccacacccccaccacccccacaacabbbaccccbccaacaccaccacbccccacccbacccaacccaacacccccccccccccccbbacacccacacaacccbccacbccccccaccaccccaacacbccaaccacaaaaacacccacacccacabaccabcccabacccaaccccaacacccccccccbbccccaa...
output:
408321
result:
ok 1 number(s): "408321"
Test #51:
score: 0
Accepted
time: 55ms
memory: 4112kb
input:
1000 bababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab...
output:
500000
result:
ok 1 number(s): "500000"
Test #52:
score: 0
Accepted
time: 61ms
memory: 4116kb
input:
1000 cacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcacbcac...
output:
250000
result:
ok 1 number(s): "250000"
Test #53:
score: 0
Accepted
time: 66ms
memory: 4028kb
input:
1000 aaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaaaaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaaaaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaaaaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaacaaabaaabaaabaaabaaabaaabaaabaaacaaabaaabaaabaaacaaabaaa...
output:
580644
result:
ok 1 number(s): "580644"
Test #54:
score: 0
Accepted
time: 64ms
memory: 4116kb
input:
1000 ababacababacababacababaaababacababacababacababaaababacababacababacababaaababacababacababacababaaababacababacababacabababababacababacababacababaaababacababacababacababaaababacababacababacababaaababacababacababacababaaababacababacababacabababababacababacababacababaaababacababacababacababaaababaca...
output:
284089
result:
ok 1 number(s): "284089"
Test #55:
score: 0
Accepted
time: 61ms
memory: 4108kb
input:
1000 aaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaaabaaaaaaaaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaabaaaaabaaaaabaaaaabaaaaabaaaaacaaaaaba...
output:
702244
result:
ok 1 number(s): "702244"
Test #56:
score: 0
Accepted
time: 50ms
memory: 4096kb
input:
899 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
808201
result:
ok 1 number(s): "808201"
Test #57:
score: 0
Accepted
time: 64ms
memory: 4116kb
input:
1000 aaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaaaaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaabaaaaaaabaaaaaaacaaaaaaa...
output:
774400
result:
ok 1 number(s): "774400"
Test #58:
score: 0
Accepted
time: 65ms
memory: 4036kb
input:
1000 abacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacabacabaaabacaba...
output:
339889
result:
ok 1 number(s): "339889"
Test #59:
score: 0
Accepted
time: 512ms
memory: 4036kb
input:
9995 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
output:
99900025
result:
ok 1 number(s): "99900025"
Test #60:
score: 0
Accepted
time: 568ms
memory: 4012kb
input:
9995 bababaaabaabaabbabbabbaaabbbbbbabbbababaaaaabbaaabbbababbbaabaabababababbbabaaaababaababbabbbabbbabaabbbbbaababaaaabaaaaaabaabbaaaabbaaababbbabbaabaababbbaabbbbaabbbbabbaabbabababaaabaababaabaabababbabbbabaaabaaabaabbaabbaabababaaaaabaabbabbbaaaabbbabbabbbaaabaaaabbbbaabbaaaabaabbaaaaaababbbaaa...
output:
25391521
result:
ok 1 number(s): "25391521"
Test #61:
score: -100
Time Limit Exceeded
input:
9995 aaccabbbcbbbcacaacbbccbbbccacabcaccbaccbccbaaaabbbcabbcbbbcabcaabbcbacccaabbcbcbcbccccccccccccccacbccaaaabacbbccbbcccbbcbacbcaabcbbcaccbbcabaabaacaacccbcbaaacbacacbabcaaaaabbbbcaaccaababbcabacbcaacbaababbacaaababacaaabcaacbaababbaabacababacaccbabbccaaaacbaacbcbbcbaccbbccbbccbaaaaabbacbacabbbbaa...