2013
12-29

# The most binary substring

Everybody knows the number is saved with the binary string in the computer. Now, their have N (1 <= N <= 1000) binary strings I tell you, your task is tell me what is the most binary substring with K (1 <= K <= L) characters in the strings I give you. The length of each string is L (1 <= L <= 60). Output times of the most appearing binary substring.

Each line will contain three numbers N, L, K.
Following N lines, represent N binary strings.

Each line will contain three numbers N, L, K.
Following N lines, represent N binary strings.

2 6 3
101011
110101
2 6 4
101011
110101

4
2

Hint
In first case, the most sequence is 101, it appears 4 times.
In second case, the most sequence is 1010 or 0101, they all just appear 2 times.


1. Thanks for taking the time to examine this, I really feel strongly about it and love studying a lot more on this topic. If possible, as you acquire experience

2. 可以根据二叉排序树的定义进行严格的排序树创建和后序遍历操作。如果形成的排序树相同，其树的前、中、后序遍历是相同的，但在此处不能使用中序遍历，因为，中序遍历的结果就是排序的结果。经在九度测试，运行时间90ms，比楼主的要快。

3. 题本身没错，但是HDOJ放题目的时候，前面有个题目解释了什么是XXX定律。
这里直接放了这个题目，肯定没几个人明白是干啥