This is the hard version of the problem. The difference is the constraint on the sum of lengths of strings and the number of test cases. You can make hacks only if you solve all versions of this task. You are given a string ss, consisting of lowercas…
Three Palindromes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1948 Accepted Submission(s): 687 Problem Description Can we divided a given string S into three nonempty palindromes? Input…