D. Equivalent Strings
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Today on a lecture about strings Gerald learned a new definition of string equivalency. Two strings a and b of equal length are called equivalent in one of the two cases:
- They are equal.
- If we split string a into two halves of the same size a1 and a2, and string