George's submission of D - Equal Substrings (Hard Version) | CodeChef