HDOJ2203 and modified kmp algorithm