Immediate Decodability
Description
给出一些数字串,判断是否有一个数字串是另一个串的前缀。
Format
Input
输入数据为多组数据,每组数据读到“9”时结束。
Output
对于每组数据,如果不存在一个数字串是另一个数字串的前缀,则输出“Set t is immediately decodable”,否则输出一行“Set t is not immediately decodable”,其中t是这一组数据的组数。
Sample 1
Input
01
10
0010
0000
9
01
10
010
0000
9
Output
Set 1 is immediately decodable
Set 2 is not immediately decodable
Limitation
1s, 32MiB for each test case.
Source
poj1056