but not can be ended with a code make of zeros.A code may or may not be preceded by a 0 in the encrypted string
Try this I/O:
Input:
Code: Select all
2
a 1
b 10
10
0
Code: Select all
Case #1
b
Moderator: Board moderators
but not can be ended with a code make of zeros.A code may or may not be preceded by a 0 in the encrypted string
Code: Select all
2
a 1
b 10
10
0
Code: Select all
Case #1
b
Code: Select all
Cut after AC
not zeroes. So, for the case belowA code may or may not be preceded by a 0 in the encrypted string (note the 2nd sample test case).
Code: Select all
2
a 101
b 10
1000101
0
Code: Select all
Case #1
My A.C. program outputs the following result for your input:polone wrote:I got WA too
but I think I can support someI think the output should beCode: Select all
1 a 0 000 0
Code: Select all
Case #1 aaa
hope it help
Code: Select all
aaa
aa
aa
a
Code: Select all
2
a 10
b 1
100010
2
a 10
b 1
10031
0
Code: Select all
Case #1
aa
ba
Case #2