← All problemsSign in

Palindromic Equivalence

CodeChefRating 2958Open on judge ↗

For two strings $A$ and $B$ with the same length $N$, we will say that they are *equivalent* if the following rule holds: For each pair of integers $l$ and $r$ ($1 \le l \le r \le N$), the substring of $A$ between the $l$-th and $r$-th character (inclusive) is a palindrome if and only if the substring of $B$ between the $l$-th and $r$-th character (inclusive) is a palindrome. You are given a st

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start