- Time limit: 1.00 s
- Memory limit: 512 MB
You are given $n$ bit strings, each of length $k$ and your task is to calculate the minimum Hamming distance between two strings.
The first input line has two integers $n$ and $k$: the number of bit strings and their length.
Then there are $n$ lines each consisting of one bit string of length $k$.
Print the minimum Hamming distance between two strings.
- $2 \le n \le 2 \cdot 10^4$
- $1 \le k \le 30$
Explanation: The strings
001000differ only at the first position.