{"trustable":false,"sections":[{"title":"Description","value":{"format":"HTML","content":"\u003cp\u003eGiven two strings $s$ and $t$, count the number of tuples $(i, j, k)$ such that\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e$1 ≤ i ≤ j ≤ |s|$\u003c/li\u003e\n\u003cli\u003e$1 ≤ k ≤ |t|$\u003c/li\u003e\n\u003cli\u003e$j − i + 1 \u003e k$\u003c/li\u003e\n\u003cli\u003eThe $i$-th character of $s$ to the $j$-th character of $s$, concatenated with the first character of $t$ to the $k$-th character of $t$, is a palindrome.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eA palindrome is a string which reads the same backward as forward, such as “abcba” or “xyzzyx”.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line is the string $s$ $(2 ≤ \\vert s \\vert ≤ 10^6)$.\u003c/p\u003e\n \n\u003cp\u003eThe second line is the string $t$ $(1 ≤ \\vert t \\vert \u003c \\vert s \\vert )$. Both $s$ and $t$ contain only lower case Latin letters.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"The number of such tuples"}},{"title":"sample1","value":{"format":"HTML","content":"\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eababa\naba\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"sample2","value":{"format":"HTML","content":"\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eaabbaa\naabb\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e7\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}