Preparing NOJ

Three Palindromes

1000ms 65536K

Description:

Can we divided a given string S into three nonempty palindromes?

Input:

First line contains a single integer $$$T \leq 20$$$ which denotes the number of test cases.

For each test case , there is an single line contains a string S which only consist of lowercase English letters.$$$1\leq |s| \leq 20000$$$

Output:

For each case, output the "Yes" or "No" in a single line.

Sample Input:

2
abc
abaadada

Sample Output:

Yes
No

Info

HDU

Provider HDU

Origin BestCoder Round #49 ($)

Code HDU5340

Tags

Submitted 17

Passed 5

AC Rate 29.41%

Date 06/03/2019 16:49:45

Related

Nothing Yet