N different palindromes
CodeChefOpen on judge ↗
A palindrome is a string that reads same in both directions: forwards and backwards. For example, the strings radar and noon are palindromes, whereas the string chef is not a palindrome as being read backwards is becomes equal to fehc, which is not equal to chef. Let's say that the pair of indices (i, j) denotes a palindrome in some string S iff i ≤ j and the substring starting at the i-th chara
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start