{"problem":{"name":"Square Subsequence","description":{"content":"You are given a string $S$ consisting of lowercase English letters. Print the number of non-empty strings $T$ that satisfy the following condition, modulo $998244353$. > The concatenation $TT$ of two","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc299_f"},"statements":[{"statement_type":"Markdown","content":"You are given a string $S$ consisting of lowercase English letters. Print the number of non-empty strings $T$ that satisfy the following condition, modulo $998244353$.\n\n> The concatenation $TT$ of two copies of $T$ is a subsequence of $S$ (not necessarily contiguous).\n\n## Constraints\n\n*   $S$ is a string consisting of lowercase English letters whose length is between $1$ and $100$, inclusive.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc299_f","tags":[],"sample_group":[["ababbaba","8\n\nThe eight strings satisfying the condition are `a`, `aa`, `ab`, `aba`, `b`, `ba`, `bab`, and `bb`."],["zzz","1\n\nThe only string satisfying the condition is `z`. Note that this string contributes to the answer just once, although there are three ways to extract the subsequence `zz` from $S = S_1S_2S_3 = $ `zzz`: $S_1S_2 = $ `zz`, $S_1S_3 = $ `zz`, and $S_2S_3 = $ `zz`."],["ppppqqppqqqpqpqppqpqqqqpppqppq","580"]],"created_at":"2026-03-03 11:01:14"}}