QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#482919#793. Palindromic Partitionsfryan#100 ✓175ms30004kbC++201.5kb2024-07-18 01:45:312024-07-18 01:45:31

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 15
Accepted

Test #1:

score: 15
Accepted
time: 115ms
memory: 19328kb

input:

10
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaabaaaaaaaaaaaaaab
aaaaaaaaaaaaabxaaaaaaaaaaaaab
baaaaaaaaaaaaaabaaaaaaaaaaaaaa
aabbaabbaabbaaaaaaaabbaabbaabb
ababababababababababababababab
abcabcabcabcabcabcabcabcabcabc
abcabcabcabcabccbacbacbacbacba
qntshryhcojkqnlmqeob...

output:

30
29
2
3
2
12
15
10
30
3

result:

ok 10 lines

Test #2:

score: 0
Accepted
time: 115ms
memory: 21264kb

input:

10
aaabbbbaabbbbbbbaaaaabbb
aaaababbbaabbabbbaaaaababbb
aaabbbbaaaaaaaabbbba
aaaaaaabbbbbbbaaaaaaabbbbbbb
babbababbabbababbabab
abbabaabbaababba
bonobo
palindrome
deemed
level

output:

10
5
10
2
17
16
3
1
5
5

result:

ok 10 lines

Test #3:

score: 0
Accepted
time: 111ms
memory: 19688kb

input:

5
abba
aabaab
x
aa
ab

output:

4
2
1
2
1

result:

ok 5 lines

Test #4:

score: 0
Accepted
time: 111ms
memory: 20284kb

input:

10
aabbaabbaabbaaaaaaaabbaabbaabb
aabbaabbaabbaaaaabbaabbaabb
aabbaabbaabbaaaaabbaabbaabb
aabbaabbaabbaaaaaaaabbaabbaabb
aabbaabbaabbaaaaaaaabbaabbaabb
aabbaabbaabbaaaaabbaabbaabb
aabbaabbaabbaaaaaaaabbaabbaabb
aabbaabbaabbaaaaaabbaabbaabb
aabbaabbaabbaaaaaaabbaabbaabb
aabbaabbaabbaaaaaaabbaabbaabb

output:

12
9
9
12
12
9
12
10
11
11

result:

ok 10 lines

Test #5:

score: 0
Accepted
time: 115ms
memory: 19656kb

input:

10
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba
abbabaabbaababba

output:

16
16
16
16
16
16
16
16
16
16

result:

ok 10 lines

Subtask #2:

score: 20
Accepted

Dependency #1:

100%
Accepted

Test #6:

score: 20
Accepted
time: 99ms
memory: 20720kb

input:

10
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

300
299
2
3
2
30
150
100
300
11

result:

ok 10 lines

Test #7:

score: 0
Accepted
time: 115ms
memory: 20580kb

input:

6
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbabbbbababaaabbababbbaabbabbabbaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaababbbababbababbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbabbbbababaaabbababbbaabbabbabbaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
aaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

3
9
7
2
177
256

result:

ok 6 lines

Test #8:

score: 0
Accepted
time: 111ms
memory: 19528kb

input:

10
aaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbbaaaaaaaabbbbbbbb
aaaaaaaab...

output:

47
32
31
33
22
46
46
24
34
46

result:

ok 10 lines

Test #9:

score: 0
Accepted
time: 104ms
memory: 20096kb

input:

10
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababba
abbabaabbaababbabaababbaabbabaabbaababba...

output:

256
256
256
256
256
256
256
256
256
256

result:

ok 10 lines

Subtask #3:

score: 25
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #10:

score: 25
Accepted
time: 112ms
memory: 21436kb

input:

10
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

10000
9999
2
3
2
100
5000
3333
9996
495

result:

ok 10 lines

Test #11:

score: 0
Accepted
time: 111ms
memory: 21400kb

input:

6
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

3
9
18
2
5169
4096

result:

ok 6 lines

Test #12:

score: 0
Accepted
time: 100ms
memory: 21172kb

input:

10
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaa...

output:

258
282
116
109
287
192
167
251
148
146

result:

ok 10 lines

Test #13:

score: 0
Accepted
time: 115ms
memory: 19584kb

input:

10
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabb...

output:

4096
4096
4096
4096
4096
4096
4096
4096
4096
4096

result:

ok 10 lines

Subtask #4:

score: 40
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #14:

score: 40
Accepted
time: 175ms
memory: 30004kb

input:

10
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1000000
999999
2
3
2
1000
500000
333333
999996
48937

result:

ok 10 lines

Test #15:

score: 0
Accepted
time: 146ms
memory: 29360kb

input:

6
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

3
3
7
2
635623
262144

result:

ok 6 lines

Test #16:

score: 0
Accepted
time: 164ms
memory: 29592kb

input:

10
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1777
1925
1110
1151
2733
2540
2190
2760
1152
2229

result:

ok 10 lines

Test #17:

score: 0
Accepted
time: 154ms
memory: 26200kb

input:

10
abbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbaabbabaabbaababbabaababbaabbabaababbabaabbaababbabaababbaabbabaabbaababbaabbabaababbabaabbaababbabaababbaabbabaababbabaabbaababbaabbabaabb...

output:

262144
262144
262144
262144
262144
262144
262144
262144
262144
262144

result:

ok 10 lines