QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#841678#9921. Yelkrabucup-team639TL 1920ms363220kbC++173.4kb2025-01-03 22:18:382025-01-03 22:18:38

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 554ms
memory: 117912kb

input:

2
5
aa
ab
ab
ac
d
1
aaaaa

output:

2 6 1 9 8
5

result:

ok 6 numbers

Test #2:

score: 0
Accepted
time: 512ms
memory: 117936kb

input:

10
10
bba
bbaaaabbbaaabaabbbaaaaaababaababbb
b
baaabbaab
babbb
bbbbbaaaaababbabbabbb
bbaaaabbabb
b
aaaaabab
abbbabbabab
10
abb
ab
bbaaaba
bbabbabba
bbbabbbababaaaab
b
aaaa
babababbb
ab
a
2
aaaaabbaabbbbbababbbbbaabababbbaaababbbaaaaabbbaabaabababbaababbabbabbaababbbbbabbbabaaabbbabab
abbaaaaaaaabbaa...

output:

3 35 35 32 60 75 76 67 75 120
3 1 8 31 41 40 43 55 58 54
95 146
32 38 39 41 51 79 79 70 70 112
3 22 47 90 91 117 129 146 157
40 53 62 63
12 46 51 51 83 111 99 113 126 106
10 45 48 49 89
12 22 28 37 61 67 70 123 102 118
50

result:

ok 71 numbers

Test #3:

score: 0
Accepted
time: 532ms
memory: 118304kb

input:

100
6
baaaab
aadabdbdadabbbbcda
ccbc
b
dccaddba
da
7
aad
dababba
addbdbbbbdabdaadacbabadabdcccbdccabadbbddddaaaddbdbcaa
abcddd
c
bddcc
ca
9
daadbbcaa
bacbdbaab
bcbaba
acbcbd
ac
b
bddcddcdccacdcbbccaccdbc
dabbdccabb
accbbbc
12
bcbdabba
ac
b
cdbbaa
cdaa
bddac
bbacbcaacbbbbbaa
b
dadcbd
bcc
bbbdbcdacbbb...

output:

6 24 28 31 39 35
3 10 66 71 70 77 73
9 18 26 28 38 36 54 72 75
8 10 9 19 19 31 37 33 59 57 73 82
9 23 33 39 70 68
15 81
19 182 241 252 262 306 321 352
14 26 24 37 33 38 51 48 57 105 112 116
40
1 0 22 54
126
64 120 125
17 28 51 66 103 104 131
1 13 19 29 31 47 47 45 62 61 71 69
226
10 21 20 51 52 60
6...

result:

ok 698 numbers

Test #4:

score: 0
Accepted
time: 550ms
memory: 118084kb

input:

100
1
aaabbbbaaabbabbaabbababababab
12
abb
a
bbab
b
aaabbabaaabbbba
bb
baba
bb
a
aba
abaabb
bb
7
aa
aaabaabbaabbaabaaaaaaabbabbaabbb
bbaaabaaaaaababbababbbaabbbbabbbaabbaabaaabbbaaababaaaaaabbabaaaabbaab
aaabbbaaaabaaabababbaabaaabbbbbbbaabaabbbaabbbbbbaaabb
abababbbabbabaaabaabbbbbbaaa
ababaaababab...

output:

29
3 6 10 13 31 26 20 32 47 35 49 32
2 38 108 144 178 248 253
12 28 40 84 125 107 134 143 174 230 211 221
1 0 7 9 12 13 10 14
19 20 38 42
1 5 11 10 10
7 19 23
11 16 18 29 85 112 97 233
1 4 7 4 0 25 31 39 50 57 56 56
3 7 11 11 13 0 26 27 7 8 6 54
40
72 108 136 151 159 157 153 200 246 201 197 208
5 9
...

result:

ok 711 numbers

Test #5:

score: 0
Accepted
time: 548ms
memory: 118072kb

input:

100
5
bababccabcacccb
ccaabaa
ccbaacbabbacc
bcbcbccbcababbcccccabc
baaaac
8
c
abcabbbcc
cacbcbbbbaabbabacb
cbb
a
c
acccbaacabbccbca
aa
1
baccaababccabbaaaaccbacaabbababbabcbcbcbbccaccbccbcabbababcbbccacccccbacaccaaabbaaaacbccbcaaacbaaccccbaccbcbabbbcccaababbaabbcbcacacacaaacbcccaaaabaccccb
7
abacacb...

output:

15 22 39 63 52
1 10 30 30 39 32 53 53
153
24 36 58 94 91 116 127
12
53 112 137 226 301
4 6 12 20 17 16 41 43 63 32 32 32
3 1 3 1 2 22 32 38 37 33 52
209
6 9 43 46 43 55 61 82 90 111 114 117
150 225 267 279
3 7 14 29 28 54 52 75 82 98 125 143
1 4 7 3 15
1 1 5 7 9 13 20 18 17 31 35 40
56
19 58
4 24 56...

result:

ok 686 numbers

Test #6:

score: 0
Accepted
time: 689ms
memory: 344124kb

input:

1
10
cabaabaabbcabaaaacabbcbabaababaccaccacaacccaaaababccbbcaaccaabcbccccccccbbcbbccbccbbbbccabbbcccbcaabbbbbacabcccbbaaabaaabbcabaaacacaaabbcaacacaabcccbccacababbbacbbacabccbcaabccabaccabbbbaaacacabcbbcacabcabcbaccbacbbbabbabcaaaaccbbacccaccaaccaabccacbbcbbacccacbabbccaacccbcaabacbcaccaacccccaccbab...

output:

111956 186203 269128 465829 642491 700512 757152 903532 903751 1000006

result:

ok 10 numbers

Test #7:

score: 0
Accepted
time: 670ms
memory: 363220kb

input:

1
1
bccbaaaabcccbbabccbabaccbbbabcabaaaacacbcccacbcbccbcbabbabaacbaacaccbcbacccaaaaacbbbbacbcbabaccbbccbcabbababacaaabacbbcaacccababbcacaacbbaabacabcababaabacabbacabbcbbcabbbcbccaaaabccaaaacccaccbaaccabbccbabbcbbabcacaaacbbcabcbccacbcaabcccaabbcbbabbbbbcabbccaacbabbcccbbcaaacbacabbabacaacacabcbaaccc...

output:

1000000

result:

ok 1 number(s): "1000000"

Test #8:

score: 0
Accepted
time: 921ms
memory: 123192kb

input:

100
2666
g
sn
lat
e
h
ktpo
j
pckf
e
ovn
qe
naudp
ysm
munzjl
usb
zcwgny
eyaafhgtey
kunpaieisjlh
cvorcc
q
se
s
rgg
isby
rlod
f
cyiuczytnk
vgc
vg
fkuk
e
hqg
n
o
du
cdz
kouhklg
fgfhaj
tzu
j
x
k
ju
t
m
qw
v
h
f
y
bhi
y
yx
rem
oo
b
h
dljurs
gxalmvnt
ckjqwc
gupriva
k
k
tosk
mtdn
iyuc
s
o
en
sf
fxygl
cpq
ui...

output:

1 3 6 7 8 12 13 17 16 23 21 30 29 39 42 44 57 67 77 78 70 64 95 91 85 86 110 109 127 121 120 101 104 107 109 111 109 148 153 158 157 146 137 180 183 174 160 162 167 164 169 173 189 135 188 191 190 182 176 184 176 182 186 193 216 214 219 228 233 242 238 236 236 210 174 175 173 179 188 177 164 161 166...

result:

ok 500000 numbers

Test #9:

score: 0
Accepted
time: 629ms
memory: 127768kb

input:

100
313
jybrvzxmxx
wbeszgdzcuvyaxybiradklnjflfwrvucidrimtkbslbktydammrlrhnvbtpxqnobugenqtiuojgehrbsauxeoootfpycll
hknzullaxnsueunohbzcegxkqremeqmircnkgubfdjdgprekbbudukasholtnvkfvcqgwemopmiqrgjkvgrlsfqrbmqmtzbkbcahoxikkkznobtozeekrtgvezteegflqhpmrdwcewftemdimviryq
muwwzhqalmjaryahqsh
gv
ykmsxddeddhu...

output:

10 104 254 273 275 296 368 411 473 516 530 590 597 611 617 637 658 675 721 744 737 829 832 891 889 901 956 1020 993 1048 1046 1096 1122 1277 1269 1305 1335 1375 1420 1468 1575 1542 1617 1600 1717 1685 1691 1673 1790 1745 1841 1800 1813 1811 1913 1958 2044 1988 2078 2183 2224 2181 2302 2268 2250 2317...

result:

ok 10000 numbers

Test #10:

score: 0
Accepted
time: 1121ms
memory: 121932kb

input:

100
7218
a
a
bca
a
c
cab
cc
a
b
bc
c
acb
a
a
cb
ac
c
b
ab
bcbb
b
ab
b
cb
a
cc
b
c
a
b
a
a
a
a
c
b
c
a
a
aba
a
c
b
cc
a
c
b
a
cc
c
a
b
c
b
c
cc
b
c
ca
b
bcb
cb
bbc
c
a
c
cb
ac
bc
a
c
b
b
b
b
ca
b
b
b
a
ca
c
a
b
a
a
c
bca
a
b
b
a
c
b
ab
a
c
c
a
b
cc
b
ab
bca
b
cba
b
cba
b
b
b
a
aaa
bab
b
bb
caab
a
b
a...

output:

1 0 7 7 6 13 14 9 4 23 28 28 28 24 25 11 5 28 10 52 40 59 49 38 44 14 11 18 20 35 49 57 61 42 50 6 24 8 49 44 4 38 18 102 78 84 104 118 117 74 82 110 94 12 41 1 53 13 70 69 41 3 28 34 40 6 90 107 127 121 35 57 33 57 81 75 121 6 112 8 113 109 9 117 81 43 113 4 28 112 10 77 147 241 202 154 249 139 171...

result:

ok 500000 numbers

Test #11:

score: 0
Accepted
time: 1346ms
memory: 119328kb

input:

1
10000
ixmutxgrmqaslccwrrnjlgucmqplaxwlzcqijgxsvxfiqffnlfqcjdbeyw
ixmutxgrmqaslccwrrnjlguc
fivqhrcivctlqjsthgwarppzvufxmaasdibagfrapsmghhkftyqpagvwhxhqnnhiyhyvhvyptny
fivqhrcivctlqjsthgwarppzvufxmaasdibagfrapsmghhkftyqpagvwhxhqnnhiyhyvhvyptnyxbzvphukkyfruzlabxdhiugbhsxdgdyunlqehyybgxknfkgnvdruszxom...

output:

58 98 173 368 312 867 586 214 374 1003 1019 1601 395 203 891 1398 1148 1282 451 461 57 3727 2087 3014 978 128 315 986 801 585 814 3842 3132 3924 2248 654 3731 3302 3310 2195 2767 7827 3836 676 6983 4203 7256 7234 3353 2974 3272 2968 413 1990 1656 6285 3696 3370 3767 3449 3137 6205 5763 5027 4643 570...

result:

ok 10000 numbers

Test #12:

score: 0
Accepted
time: 1920ms
memory: 137192kb

input:

1
500000
a
abb
a
ab
a
b
abbba
bba
abbb
b
ab
b
b
bbaab
a
a
bb
bb
abb
b
a
b
abb
ab
bb
bbaa
bbaabbb
bb
bb
abb
ab
bb
ab
bb
abb
bba
ab
bba
abbba
b
bbaa
bb
ab
a
b
abbb
b
a
b
bba
b
a
bb
bb
b
a
ab
bbaabbba
abbbaa
b
bba
b
bb
ab
ab
a
a
a
ab
bbaabb
a
b
a
abb
ab
abbb
bba
a
b
ab
ab
ab
bb
a
a
a
a
a
abb
b
bb
b
a
b...

output:

1 6 4 6 12 13 10 19 5 5 10 17 23 11 58 44 42 0 27 4 0 28 8 25 59 14 42 27 118 95 40 53 17 41 124 85 125 83 9 55 126 72 108 30 8 87 113 31 0 62 84 113 17 6 38 4 84 184 62 3 17 47 239 191 15 47 154 238 202 170 242 214 181 43 117 219 125 121 49 100 210 96 32 58 14 12 36 26 215 173 230 156 161 83 119 11...

result:

ok 500000 numbers

Test #13:

score: -100
Time Limit Exceeded

input:

1
500000
w
wyh
w
wyh
w
w
w
w
w
w
w
w
w
w
w
wyh
w
w
w
w
wy
wyh
wyh
w
wy
w
w
w
w
w
w
wyh
wyhsqdu
w
w
w
wyh
wyh
w
wy
wyh
wyhs
wyh
w
wyh
w
wy
w
w
wy
w
w
w
w
wy
w
wy
wyh
wyh
wy
w
w
wyhsqduyu
w
w
w
wyhsqd
w
w
wy
w
wyh
wyhs
wyh
wy
w
wyh
wyhsq
w
wyhsqd
w
w
w
wyh
w
wyhsq
wyh
wyh
wyh
w
w
w
w
wy
wyh
wyh
wyhs
w...

output:

1 6 4 7 3 1 7 2 5 1 11 13 1 7 15 2 18 5 23 15 10 15 19 17 58 50 36 28 0 58 36 12 45 33 29 50 37 46 58 92 100 63 47 65 110 96 92 70 9 31 69 69 113 19 41 83 23 47 41 5 55 47 63 52 92 92 104 96 58 90 226 138 92 44 20 236 226 6 74 129 228 192 146 106 220 250 79 87 215 219 183 97 31 25 89 137 130 62 6 14...

result: