QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#43976#4594. UndercitylarryzhongAC ✓1845ms89564kbC++171.1kb2022-08-12 01:10:382022-08-12 01:10:41

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1845ms
memory: 89564kb

input:

10
2 2
ab
cd
2 2
aa
aa
5 4
cbbc
cbdb
ddcb
addd
adab
4 5
babab
ababa
aaaba
bbabb
4 4
aaaa
aaaa
aaaa
aaaa
3 5
aaaaa
aaaaa
aaaaa
4 6
aaaaaa
aaaaaa
aaaaaa
aaaaaa
6 6
ccccac
cbbccb
ccaabb
bbabbc
acccbb
bacbcb
6 6
dnkjua
aqoqpb
afgbvc
nhfmid
nehrse
eelbnf
6 6
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa
aaaaaa

output:

1
9
6457
61410
254016
97344
293642496
144181677
128
15933509222400

result:

ok 10 lines