QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#88040#4950. Finding Maximal Non-Trivial Monotonesxiaowuc1AC ✓3ms3624kbC++172.1kb2023-03-14 23:31:082023-03-14 23:31:09

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3380kb

input:

7
abababa

output:

0

result:

ok 1 number(s): "0"

Test #2:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

7
bababab

output:

0

result:

ok 1 number(s): "0"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3320kb

input:

10
aababaaabb

output:

5

result:

ok 1 number(s): "5"

Test #4:

score: 0
Accepted
time: 2ms
memory: 3380kb

input:

10
bbaababaaa

output:

5

result:

ok 1 number(s): "5"

Test #5:

score: 0
Accepted
time: 1ms
memory: 3408kb

input:

2
bb

output:

0

result:

ok 1 number(s): "0"

Test #6:

score: 0
Accepted
time: 2ms
memory: 3328kb

input:

2
ba

output:

0

result:

ok 1 number(s): "0"

Test #7:

score: 0
Accepted
time: 2ms
memory: 3324kb

input:

2
aa

output:

2

result:

ok 1 number(s): "2"

Test #8:

score: 0
Accepted
time: 2ms
memory: 3320kb

input:

2
bb

output:

0

result:

ok 1 number(s): "0"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3324kb

input:

2
ab

output:

0

result:

ok 1 number(s): "0"

Test #10:

score: 0
Accepted
time: 2ms
memory: 3316kb

input:

2
ab

output:

0

result:

ok 1 number(s): "0"

Test #11:

score: 0
Accepted
time: 2ms
memory: 3488kb

input:

2
ab

output:

0

result:

ok 1 number(s): "0"

Test #12:

score: 0
Accepted
time: 1ms
memory: 3328kb

input:

2
aa

output:

2

result:

ok 1 number(s): "2"

Test #13:

score: 0
Accepted
time: 2ms
memory: 3328kb

input:

2
aa

output:

2

result:

ok 1 number(s): "2"

Test #14:

score: 0
Accepted
time: 2ms
memory: 3368kb

input:

2
ba

output:

0

result:

ok 1 number(s): "0"

Test #15:

score: 0
Accepted
time: 2ms
memory: 3404kb

input:

100
bbbabbbaababaaabaaaaabaaaaaabbabbababbbaabaababbbbaaaaaaabbabaaabbbaaabbbaaabbbababbbbaabbbbbaaabbbb

output:

41

result:

ok 1 number(s): "41"

Test #16:

score: 0
Accepted
time: 1ms
memory: 3424kb

input:

100
aabbababbbbbabaabbababaaaaabbbbbbbaaaabbbabbbbbababbababbbbabbbbbbbbbaaaabbbabaaaaabaaabababbabababb

output:

25

result:

ok 1 number(s): "25"

Test #17:

score: 0
Accepted
time: 0ms
memory: 3384kb

input:

100
bababbaaaaabbbababbaabababbaaababaabbabaaaaabaabbbbaababaaababaaaababbabbaaabaaabaababaabbbbbaabaabb

output:

42

result:

ok 1 number(s): "42"

Test #18:

score: 0
Accepted
time: 0ms
memory: 3452kb

input:

100
abbabababbbbbaabaaaabbbbbbbabbabababbaaababababaaaababaabaabbabaabaaabababbbbabbbbaabbbaababbaabbaba

output:

28

result:

ok 1 number(s): "28"

Test #19:

score: 0
Accepted
time: 2ms
memory: 3372kb

input:

100
babbbabaaabbbaabbaaaaababababbaabababbabaaaaabbbbaaababaaaaabbbaaaaabbbabaabbabaaaabaaabaaaaaaaaaabb

output:

49

result:

ok 1 number(s): "49"

Test #20:

score: 0
Accepted
time: 0ms
memory: 3432kb

input:

1000
aaabbaabaababbbbbbaabaaababaabbaabaabbabbbbbaabbbbaaabaabababaaaabaaaabbbbbbbbbbababbaaaaababbabbbbaaabaaababaaabbaababbbaabbbbbbbbbaabbaabaaabaabbbabbbaababbbaaabaabbbbaabbbbaabbbbaabaababbbabaaaabaaaabbaaaabaaabbbbaaabbbaababbbabaabbbababbabaabbabbaabbbbbabbabaabababbaaababaaabbbaabaaabbbaaab...

output:

378

result:

ok 1 number(s): "378"

Test #21:

score: 0
Accepted
time: 0ms
memory: 3332kb

input:

1000
aabaabaaabbbbabbabaaaaabaabababaabbaabbaabaaaaaaabbabbabbbabaaabaaababaaabaabbbbabbbabaabbbaaaaabaaaabbabaababaabbbababbabbbabaababaaabaababbbaabbbaabbababbaabbbaabbaabbbaabbbbabbaabaababaabbbbaabbaabbbaabbababbaabbbbababbabaaabaababbbbbaaaaababaaaaaabbbbbbaaabbabbbbaaaaabbaabbaaaaaabbbbbbabbba...

output:

431

result:

ok 1 number(s): "431"

Test #22:

score: 0
Accepted
time: 2ms
memory: 3504kb

input:

1000
abbbabbbbaaabbaaabababbbaaabbbbaaaaabbbbabaabbbbbbbbbbabaababbabbabbbbaaabbabbaaababbbbbabaababaabaaaababbaabaaababbbabbbaabbaabaaaabbbbaabaaababaabbabaaabbbaaaaabbabbbbbaaaaabbbabbaaaabbaaaaaabaabbaaababbaaabaabbabbaaabbbaaabababaaaabbaabaaaaaababaaabaabbabbababaaabaabbabaabbabbbabaabaaabababa...

output:

410

result:

ok 1 number(s): "410"

Test #23:

score: 0
Accepted
time: 2ms
memory: 3344kb

input:

1000
aabbbaaaaaaababaabababababbbbbbabbbabbbaaabbbbbabababbabbbbababbbbabbbbbaaaaaabbbaaabbabbbbaababbaabbabaaaabaaaaabbbabbaabbababababbbaaaabababbaabbabbbaaaaabaaabbaabababbbabbabbbbbbbbaaabbaaaabbaaaabbbaabbbabbababbaaabaaaaababababaaaababbbbababbaaababbabbaaaaaaaabbbaabbbaaabaabaaabbaaabbbaaaaab...

output:

363

result:

ok 1 number(s): "363"

Test #24:

score: 0
Accepted
time: 2ms
memory: 3420kb

input:

1000
bbbbabbaababaaaabbbbababbabbbabbaabaababbaabbabaabbbbbbaaababaaaaabbbaabbaaaababaabbbababaaaaabaaaaabaabbabababbaabbaababbaaaabbbaabbbaaaaaabaabbbaabaaabbabbabbabaabbaaaabaababaababbbaaaabaaabbbaaabbbabbbbaaaabaaaababaabbbbbbaabbbbaabbaaabbbbabaaabbabaabbbabbabbabbbbaabbbbbaababaaaabbbabbbababb...

output:

408

result:

ok 1 number(s): "408"

Test #25:

score: 0
Accepted
time: 2ms
memory: 3456kb

input:

1000
bbbbbabbbbaaaaaaaaaabbbbababaabaabbaaaaababaaabababbabaaabbbbaabbbabbbbaabbababbbbaabbbaabbabbbbbbbabababbabbaaababbbbabaababbbbbabbaabaaabbaaabbabbbbbaababbabbabaabbaababaaababbbabbabbaabbbbabbbbabbbbbababaaaaaaaaaabbbaabbababbbaabbaaabaaaaabbbbbabbbaaababbbabbbababbaabbbababbbbbaaababbabbabbb...

output:

360

result:

ok 1 number(s): "360"

Test #26:

score: 0
Accepted
time: 2ms
memory: 3348kb

input:

1000
abbbbababbbaababbabbbbbabaabbaaaabaaaabbbabbbabbababbaabbaaaababaabaaabbababbababbbbabbaaaabbabaababbbbbaabaabbbabbbbbaabaaababbaaababaabbbabababbabbaaababbbabbaaaaabbaaabbbbabbbaababaabbbbbbaaabaababbbbaababaaaabaabbabbbaabaaaabababaaaababbaaaaabababbabaaabbbabbbabbbaaababbaabbbabbbbbbbabbbbab...

output:

347

result:

ok 1 number(s): "347"

Test #27:

score: 0
Accepted
time: 2ms
memory: 3496kb

input:

1000
aaaaabaaaabababbbabbababababababaaaabaaabaabbbabbbaabbbbabababaaaababaabaaaaabbbaaaabbbbababbabbbaabaabbaaaababbbbbbbaaaaabbabaabaaaabbabbabaaabbbbabaababaabaaaaabbabbbaaababbabaababbabbababbbbaababaabbbbbbaabbababaaabbabaaaaabbbaaaaaaababbbbabbbabbaaaababbbabbbabbabbbabbbbbabbabbaaabbbababbaba...

output:

364

result:

ok 1 number(s): "364"

Test #28:

score: 0
Accepted
time: 2ms
memory: 3500kb

input:

1000
bbbbbaaaabbbbaabaaaaaaaaababbabbbabababbaabaabbababaabbabaaaabababaaabbbbababaabbbaabaaabaaaaabaabababbabbabaabbbabbaaaaaabbbbaababbaaaabababaabbaabbbabbaaaaaababaabbabaaaaaaabaaabaababaabbbabaabaabbbabbaaaabaaaababaababbabbaabbaabbaababaaabbbbbabbabababbbabbbaabbabbaabababaababbabbaaabbbaabaaa...

output:

366

result:

ok 1 number(s): "366"

Test #29:

score: 0
Accepted
time: 1ms
memory: 3388kb

input:

1000
aaaabaaaabaaabbabbbbaabaabaaabaabbabbaaaaaabbbbaaabbbbbabababbaaabbbbbbbbaaabaaaababbababbabbbabbabaabbaaaaabbbbbbbaabaababbbaabbaaaaaabbbbabbaaabbbbaaabaabbbbaaaaaaabbababbaaaabaaaabbbabbaaabbaaabbaabbaabbbbaabbabbbaaaabaaabbbbbaabbbbaaaabababbbabaabbbabbbaaabbbabbbbaabbbabbbabaaaabbabaaaabbbb...

output:

375

result:

ok 1 number(s): "375"

Test #30:

score: 0
Accepted
time: 2ms
memory: 3416kb

input:

10000
babababaaababbabbbbbabbaababaabaababbbabbaaaabaaababababbabbbababbaaaabbabbaabaabaababaabbabbaaabaaabaaaaabbbababaaabbbbaaabbaaaabaabbaaaaaabbbabbabbabababababaabbabbbbbbaaaaaaaaaaaabbbbbbaaaabbaaaaaaaaaaaabaabaabaaabbbbbaabaabbabaabaaabbabbabaabaabbababbabbaaaaabbabbabaaabbabaaaaaaabaaabbabab...

output:

3630

result:

ok 1 number(s): "3630"

Test #31:

score: 0
Accepted
time: 1ms
memory: 3440kb

input:

10000
baabababbaabbaaabbaabbabaabaaaababaabaabbbabbabababaabaaabaababbbabbaaaaabbabaabaaaabbaaaaabaabbabaabbabbbaababbabbbbaaabababbbbbabaaabbabbaaaabbaaababbbbabbbbaaabbabbbababaabbbabbbbaaabbaabaababbabaaabbabbbaaababbababbbabaabbabbbaaabaaaabaaabbbbabbabababbbaaabbbaaaabbbbabbbaabaabaabaabbabbaba...

output:

3880

result:

ok 1 number(s): "3880"

Test #32:

score: 0
Accepted
time: 2ms
memory: 3512kb

input:

10000
aaabbaabaaabbaaaaaabbaaabaabbbaaababbbaaabaabaababaababaabbbaabbabbbbbbabaabbaabaabbbbaaaabbbbbabbbbabbaabaaababbbbbabbaabbabbbbaaaaaaaaababbbbababaababbabbabbabbbababaabbbabbaabbbababaaaabaabbaababbbbbabaabbbbaaaaaababbbaaabbabaabaabbaabbabaaabaaaaaabbbaabbbbabaabbbaaaabbbbbbbaabbbabaaaabaaab...

output:

3736

result:

ok 1 number(s): "3736"

Test #33:

score: 0
Accepted
time: 1ms
memory: 3476kb

input:

10000
aaababaaababbababaaabbbbbbbabababaaaabbbbbbaabbbababbaaabbaabbbbaaabababbbbababbbbbbbabbbbabbbabbbabbabbaababbabaabbabbbaababaaaaaabbbbbabaabaaababaaaabbbbabaababbaaabbbababbbbaaabaaabbaaaaaaababbaabababbbbbaabbbaabaabbabaaabaababbabbababababaaabbbbbaaaaabbaababbaabbbbaabaaaaabbbabaabbabbbabbb...

output:

3740

result:

ok 1 number(s): "3740"

Test #34:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

10000
aaabbbabbaabbbbbaabbabbabbbbbbabaababbaaaabbaaaaaaaabababaaabbaabbaabbababaaaababbabbbaaabaabbbbbbabbababbaabbabababbaabaabaabaaabbbabaaaabbaabbbabbaaababbbbbabaabbbbbbbbbbabbbaabbbaaaabaaabbaabbaaaabbbaaabaaaaaaaaabbabbaabbabbabaaaaababababbabbabbbbbabababaabbaaabbaabbbaaabaaababbaaabaabbabab...

output:

3779

result:

ok 1 number(s): "3779"

Test #35:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

100000
ababaababaabbabaabaaababbbabaaababaaaaaababaaabaabbaaabaababaaababaabaabbbaaabbabbbbbbaaaabbbabaaaabbbaabbaaabbabaaaabaabbabbbabbbabaabaababababbaababaabbbaaabbbabababbabaaaaabbbbababbbbaabababbbabababaaabbbbaabbbabaaaaabaababbbbbabbbbbabbbbbaababbbbababababbabaabbaabbababbaabaaabaaaaabbbbbbb...

output:

37404

result:

ok 1 number(s): "37404"

Test #36:

score: 0
Accepted
time: 3ms
memory: 3456kb

input:

100000
bbaabbabbaabaaabbbbabbaaaabbbabbbababbababbaaabbababababbabbaaabbbabbbababaaaabbbbbbbbaaaaaaabaabaaaaaabaaabaababbaaaabababababbabbabaaababbaabbaaaabaabaabbbbaabbaabbaaaabaaabbbbabbabbabbaabbbbbbbbbababababbbaaabaaabbbbaaababbabbaaaabaaabbabbaaabaaababaaabbbaabababababbabbabbbbaaabbaaaaaaaaaa...

output:

37359

result:

ok 1 number(s): "37359"

Test #37:

score: 0
Accepted
time: 0ms
memory: 3500kb

input:

100000
aaaabbaaaaabbbaabbabbbbababbabbaababbababbbbbbbaabbbbabbaababbbaaaaabbbabbbaabaaaaababbbbaaaabbbabaababababbbaaaabaabbbabbaabaabababbbbbbbbbbbabbaaabbabbaabbbbabaaabbabbabbaabbabaaaaaabbbbbaabbaabaaaaabaababaababababbbababbbaabaaaabbbbbbbabbbabbaabbbbaababbaabbabbbabbbbbabbaabbabbabbbbaababab...

output:

37291

result:

ok 1 number(s): "37291"

Test #38:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

100000
ababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...

output:

0

result:

ok 1 number(s): "0"

Test #39:

score: 0
Accepted
time: 3ms
memory: 3464kb

input:

100000
ababababababababababbbababababababababababababababababababababababababababbbababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababa...

output:

712

result:

ok 1 number(s): "712"

Test #40:

score: 0
Accepted
time: 3ms
memory: 3624kb

input:

100000
abbbababbbababaaabaabbabbbabababababaaabababababababaaabaaabaaaaababababbbaaabababaaababababababababbbaaababbabbabababababababababbaabaabaaaababaabaaaabbabbbbababaaaaabbbaaabbbabbaababaaabaaaaabbbabababababaaabaaababababababababbbbbabaabbabbbabaaabbbabaaaaabbbabababaaabababaaababababababbbbbb...

output:

24034

result:

ok 1 number(s): "24034"

Test #41:

score: 0
Accepted
time: 3ms
memory: 3612kb

input:

100000
abaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaab...

output:

66666

result:

ok 1 number(s): "66666"

Test #42:

score: 0
Accepted
time: 1ms
memory: 3460kb

input:

100000
abaabaababbaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaababbaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaabaababbaabaabaabaabaabaabaabaabaab...

output:

66201

result:

ok 1 number(s): "66201"

Test #43:

score: 0
Accepted
time: 2ms
memory: 3492kb

input:

100000
bbaaababbaaaabaabaabbbbaaaaabaaaaabbabbbbaabaababbbabbbbabbbabbaaaabaabaabaabaababbaabaabaaaaaaabbaabbaaaabaabaabaabaabaaababaababbabbaabaababbaabbabaababbbbbbabaaabbbabbaababbabbaababbaabaababbabbaaaabbbabaabaababababbbbabbaabaabbabaabbbbaaaaaaaabaabaabaabaabaabaabbbbabbaabbabaabaaaaaaaaaaaa...

output:

51478

result:

ok 1 number(s): "51478"

Test #44:

score: 0
Accepted
time: 3ms
memory: 3620kb

input:

100000
babbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabba...

output:

0

result:

ok 1 number(s): "0"

Test #45:

score: 0
Accepted
time: 3ms
memory: 3608kb

input:

100000
babbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbaababbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbbbbabbabbabbabbabbabbabbabbabba...

output:

668

result:

ok 1 number(s): "668"

Test #46:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

100000
babbabbabaaababaabbababbbaababbabbabbabbaababbbbbabbaababbaababaabbabbaababbababbbabbbababbbbbabaabbbababbbbbabbaababbaaaabbbbbabbababbbabbaabbbbabbababbbabbbababbabbabaabababaababbabbabaabbabbbababbabbabbabaabbbababbbbaabbabbbbbabbabbabaabbabbabbabbabbabbabbaababbaababbabbbababbbababaaababbb...

output:

20467

result:

ok 1 number(s): "20467"