mirror of
https://github.com/xlucn/PAT.git
synced 2026-10-31 06:37:38 +08:00
20 lines
748 B
HTML
20 lines
748 B
HTML
<!DOCTYPE html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<h1>1040. Longest Symmetric String (25)</h1>
|
|
<div id="problemContent">
|
|
<p>Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP; symmetric?", the longest symmetric sub-string is "s PAT&TAP; s", hence you must output 11.</p>
|
|
<p><b>
|
|
Input Specification:
|
|
</b></p>
|
|
<p>Each input file contains one test case which gives a non-empty string of length no more than 1000.</p>
|
|
<p><b>
|
|
Output Specification:
|
|
</b></p>
|
|
<p>For each test case, simply print the maximum length in a line.</p>
|
|
<b>Sample Input:</b><pre>
|
|
Is PAT&TAP; symmetric?
|
|
</pre>
|
|
<b>Sample Output:</b><pre>
|
|
11
|
|
</pre>
|
|
</div> |