QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#808157#2518. Puzzle Gameucup-team878TL 2163ms3900kbC++203.8kb2024-12-10 17:28:272024-12-10 17:28:29

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
7 3
ABADCAB
CBB
11 7
ABACCDBADAC
AADCDAC
3 2
ABA
CB

output:

ADCABAB
ABABDACCDAC
NO

result:

ok  (3 test cases)

Test #2:

score: 0
Accepted
time: 2163ms
memory: 3900kb

input:

15
7 3
ABADCAB
CBB
11 7
ABACCDBADAC
AADCDAC
3 2
ABA
CB
15 1
BAACABBCADADCAD
A
37 20
DADBDCDADBDCDADBDCDADBDCDADBDCDADBDBA
DDDDDDDDDDDDDDDDDDAA
37 19
DADBDCDADBDCDADBDCDADBDCDADBDCDADBDBA
ABCACABBBABACCBCABA
51 33
AAAAAABBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCDDDDDDDDDDDDDD
AABBBBBBBBBBBBBBCCCCCCCCDDDDDDDDD
4...

output:

ADCABAB
ABABDACCDAC
NO
BAACABBCADACDAD
NO
DADBDCDADCDADBDBDBDADBDADCDCDBDCDADBA
AAAAAABBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCDDDDDDDDDDDDDD
AAABBBCCDCABCDABDCADDADBCCCCCBCDBCACBBDBADAAABABDBDDBCBADAACCAADDADACDBABCADAADDDBBDABBCBCDAADDDABBCCCDCADDAAABDDACABABABBAABCCCDBBADCCAACCBCADCDDACADCDADADBBADBDBBACCA...

result:

ok  (15 test cases)

Test #3:

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

input:

15
300 294
CCBACDDAADBCDDBAAAABACCAADBADAAABABCACBCCCAABBCACCCBCABBAAABCBDAADBADAABAADACCAACDDDBBDBDDACAACDDCABACDDABABACADACBCBDACDDCDCDBDCACCCDCDABADDDBBABDBBCCBADBDAACDDCCCADDCABAAAAADBADBDACBBACDCAACABABDBDCCDABCBDDADCABDDDDDAABACACCDBDBBACADBBAAAACCCCBDCCBDDBDBBBDDDAADDBAADDCBDBAACDACCABDAACBBB...

output:

CCAAACCCACDDDCACBBCCBAAAABDBABBDBABDABCCDAADDBBADAADBACCADAABDCBABACDADDCDCAAAACCDBABCABDBACCDDBDCCBDCDCDBDBAABCDBADBADDDDDCDDCCBDDDCAABDBBAABBCDCACBABBABDDDDBBCABBBACABADDCCBACCCAADAAADADCAABCADDDDBBAAACBDADACDBDBADDDBCACABADDDCBDABDACACBACCCBAAACBBDDACBDAADABADBDACDBBAADBAADBBBACDBCCCCAACACCAAAACA...

result:

ok  (15 test cases)

Test #4:

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

input:

13
21 13
ABCDABCDABCDABCDABCDA
ABABABCDCDCDA
34 16
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCC
19 1
DCCDBCDCBADDBBCDCBC
A
19 1
CABACABCADBCCAABBAC
D
19 1
CCCCCCCCCCCCCCCCCCC
C
19 1
ACCCCCCCCCCCCCCCCCA
A
19 1
CBAABCADDAADADDDADC
C
2 1
AB
A
2 1
DD
D
2 1
AB
C
2 1
CD
C
9 8
ABDBACABA
DBABABAC
10 ...

output:

ADADABCBCBABABCDCDCDA
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
DABBCCDDCDCBCDBCDBC
CAABBCCABACABCABDAC
CCCCCCCCCCCCCCCCCCC
ACCCCCCCCCCCCCCCCCA
CBAAADDDDADADABCDAC
AB
DD
NO
CD
NO
BCADBAAADD

result:

ok  (13 test cases)

Test #5:

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

input:

14
570 554
CDDBDDDCBAADBAADADADDBDADCADDBDBACBDCAADDDADCDDCABAABBDDCCCACBCDCADBBADABCBCBDABDBCDDCACBDDCBADCDCACDBDDCBDACCCACBBDBABDCBCCCCBDCACABBCBBBCAACBDBBCBCBBDADCABCCABCDADCCCADDCDCACCBBCDDAACBDDCCDBDACCBDAACACBDCDACBCDCBCBDACCBCDDDCDDCCCCBABBACCCDCCDBCACDBBDCABABBACDABBDADBCDBDCDCDDABBCDBCBCCCA...

output:

CDDDCBAABDCDACDDDBDBDAACDACDBADCAABCBCDBABADDDDBDCAADDCAADDADBACADCDBABAABABDAABCDCABCBDCBCBDAABDBDBCDADAABDBCAABDBCDACDCAADCDDCDACDBDDDBCCDDBADADBBDAACDCACDAABBDBCADBDDBCCCDBBDACBACCBBCDBACDADCDCCBDACACABDADADDAACCCBDCDABBACBABBBBDBDCCABBCAABABDADBDDCCBDDBDBCADCCCCADBDBDCCDDDBCDADCCBDCBACBBBACDDDBC...

result:

ok  (14 test cases)

Test #6:

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

input:

15
948 930
CDDDACAADCACBBABBACBDBBDBCACCDAABCBAACDDBDBBDACCDDCACADDAADCDDCAABDCBCDDADCCBCDADDCCABABDBBBADDDBADBADADBAAAABDBCDDADBBABBACDBDBDCBDDAABCBDCCCDABBABDDDAAACDBBABAADCBBAABCADBCAACABDCBBCCCBACCCDBADBAABCADCAAAABBADBACABCDACBABBCBCDCDDBDBDABABCBABDBBBBADDACADBDBAADADDDDCABDDBDCBABDABCBADCCAAB...

output:

CDAAADDDDDBBDCABDCAABAABDBDACBBCBDDABDCDCAAACDADBACDDDDBDBADAAADDACBAABBDBADDBADBCCCCABDBBBCDDDAADCDBCBABABDBACABCDACBABBCBCDCDDBDABABBBBADDABDBDADDAABBCABDCDBBDBAAAACDABDABCBADCDDCCCDBDACBDCBDDACBACBCDDBAABAAACBAADDBDBCBCCCAABADCDAACDADABDABCDBDCAAADDAABACDBCDDDAACABBADDBBBBACBAADDDDBABCACCDBACBCBD...

result:

ok  (15 test cases)

Test #7:

score: 0
Accepted
time: 158ms
memory: 3832kb

input:

15
615 597
CCDCBDBBBCCADDCABCDBAAACCDDABACDBDCCCCBBBCDBCDCCACBCBBBDADBCBCBDAAAADDABCABBDDAABABDABDBCDDBCCDACAADCCDBADCBAACCCDAAADCCDBCCAAABBBCDBBDDDCBDDBBDACADDAADAAACADDDDBACDAACDAABBDBAAAADADBABDCDDCACDACDDBBBCAACACABADDCAAABACDBCBBDDBCACABBCCACBADBDCBCDDBACCCDDBBCDABACBABDCBACABDDBBDDCDBCACDDCBAA...

output:

CDBBBDBDBDAADCDCACDBDCDBCDCBBBCACBCCCCCBBCDACBCBDCBDADADBDBBCDACADBBDADBCBDDABBADADCDDBBDACACDDBAABDBADDDCBCABDCDACCBCDCAADBDBDDBCDDCDAACDDDBBBCBAADDCBACAADADADDDAAABBABCBDCCBBDACADAAADDBBCACCBBAAAABDBCBAABADDCDABACBDBBDDCDCBAADBCCABDDBCDBAACDACADBABACCCCACDADACDADCCCABABAACBABBACBADDDDACBAADBDDDDAB...

result:

ok  (15 test cases)

Test #8:

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

input:

15
852 835
DADBABCCACBDADDADCADCDAABACCABCBABBCDAABBDAAADCABACBACADBBACBDCBABABCCACCAAACADCADBDCCCDADCADCDBDDCCBBBBCCCDCDDCCCCDAADDAABACDAACADCDCAAADCDBCBDCCADDCCDDCBCDDDDBDADCDAABDBACDABADCBCDCBDCCAAACBDAADBBBADCDDBCBBCBDAAACBAADBBADDDCCCDCBCAAADCBBDCDABCBABBADDCDACDACDCDCADBDADBCBCABDAAADCBABCABDC...

output:

DAAABBBBDDDBCDABDCADBABCCACBDADDADCADCDAABACCABCBABBCDAABBDAAADCABACBACADBBACBDCBABABCCACCAAACADCADBDCCCDADCADCDBDDCCBBBBCCCDCDDCCCCDAADDAABACDAACADCDCAAADCDBCBDCCADDCCDDCBCDDDDBDADCDAABDBACDABADCBCDCBDCCAAACBDAADBBBADCDDBCBBCBDAAACBAADBBADDDCCCDCBCAAADCBBDCDABCBABADDDACDACDCDCADBDADBCBCABDAAADCBABC...

result:

ok  (15 test cases)

Test #9:

score: 0
Accepted
time: 57ms
memory: 3640kb

input:

15
397 379
ADADDDBACBBBDADAADBDDDDCBDACABCDDCAACADCCCBAADABCDDCCBADACDBBAABBCDDDCDDAAAAACADAADBBADCCCBCACAAAABDCDDBAADDDBBDBCBBAADBADCBBDACDCCDABCDCADBDBDADBBABCBABABBCBDCDDBBCCDBDDBBBCDABDBDBACACBCBBBCDCACADDDBCACDCBCDCDCBBBDBCCBBDABCCDAADCBDDCBABDBBDAACBDCABCBDBACCDDCDBDBABDBDAAABADCADDDBAACDAABCA...

output:

DBDDBDCCAAACDBDBCBCBCBCAACBDBDDADADDDCCACBAADDCBCDBACBDBDDCADBDDCDDCABCBDADCBDABBAADADADDDBDBDBBBCDDBABDBDCDDCCABDBBBABCBABABBCBBDCABDADBDCCDBACCCDDADCBBABBDBBDDACBBBBAABDBBACADABCDCCBADBBCBDCCBDBCAACDCDABACADBCBCCDDCBAABDCDCABCDDAACACBDDDACACBCCAABCABABCCDCADCCCBAADAAAADABDDBDCCBBDDDBDAADADBBCAADDD...

result:

ok  (15 test cases)

Test #10:

score: -100
Time Limit Exceeded

input:

15
145 127
BCCADBCBDBCABDBAACCBDCDBABBABACAABCBCDACDADDDBBCCCBACCCACADDBDAADADADCBBBAADBADBCDDDBBACBBABDADBCDDBCBDAACBCBCCDAABADABACCBBBCBAACADDDDDCABBACDDA
BACBADABBBACCCAACAACBDABCDBDBCCABBBCADDCACDBCADBDDDAADBBBCAACDBADDACABBABDBBBCBBCDDDBBAABBADCDAABCCCBDCBCDBAACDCDACDDDCDABCDCBD
166 148
DBCADBC...

output:


result: