[GESP202409 三级] 回文拼接

Luogu
IDLGB4039
Time1000ms
Memory512MB
DifficultyP2
2024枚举字符串(入门)GESP
一个字符串是回文串,当且仅当该字符串从前往后读和从后往前读是一样的,例如,$\texttt{aabaa}$ 和 $\texttt{ccddcc}$ 都是回文串,但 $\texttt{abcd}$ 不是。 小杨有 $n$ 个仅包含小写字母的字符串,他想请你编写程序判断每个字符串是否由两个长度至少为 $2$ 的回文串前后拼接而成。 ## Input 第一行包含一个正整数 $n$,代表字符串数量。 接下来 $n$ 行,每行一个仅包含小写字母的字符串。 ## Output 对于每个字符串输出一行,如果该字符串由两个长度至少为 $2$ 的回文串前后拼接而成则输出 Yes,否则输出 No。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1159> ## Note ### 样例 1 解释 对于第 $1,3,4$ 个字符串,都不是由两个长度至少为 $2$ 的回文串前后拼接而成。 第 $2$ 个字符串由回文串 $\texttt{aa}$ 和 $\texttt{bbb}$ 前后拼接而成,并且两个回文串长度都至少为 $2$。 ### 数据规模与约定 对全部的测试数据,保证 $1 \leq n \leq 10$,且每个字符串的长度均不超过 $100$。
Samples
Input #1
4
abcd
aabbb
aaac
abcdd
Output #1
No
Yes
No
No
API Response (JSON)
{
  "problem": {
    "name": "[GESP202409 三级] 回文拼接",
    "description": {
      "content": "一个字符串是回文串,当且仅当该字符串从前往后读和从后往前读是一样的,例如,$\\texttt{aabaa}$ 和 $\\texttt{ccddcc}$ 都是回文串,但 $\\texttt{abcd}$ 不是。 小杨有 $n$ 个仅包含小写字母的字符串,他想请你编写程序判断每个字符串是否由两个长度至少为 $2$ 的回文串前后拼接而成。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P2"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB4039"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "一个字符串是回文串,当且仅当该字符串从前往后读和从后往前读是一样的,例如,$\\texttt{aabaa}$ 和 $\\texttt{ccddcc}$ 都是回文串,但 $\\texttt{abcd}$ 不是。\n\n小杨有 $n$ 个仅包含小写字母的字符串,他想请你编写程序判断每个字符串是否由两个长度至少为 $2$ 的回文串前后拼接而成。\n\n## Input\n\n第一行包含一个正整数 $n$,代表字符串数量。...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments