Files
PAT/source/html/a1040.html
T
2018-12-23 20:01:49 +08:00

20 lines
1.0 KiB
HTML

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
.katex-html {display: none;}
.katex-mathml {font-size: 0px;}
.katex-mathml math mrow {font-size: 16px;}
</style>
<h1>Longest Symmetric String</h1>
<div class="ques-view"><p>Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given <code>Is PAT&amp;TAP symmetric?</code>, the longest symmetric sub-string is <code>s PAT&amp;TAP s</code>, hence you must output <code>11</code>.</p>
<h3 id="input-specification-">Input Specification:</h3>
<p>Each input file contains one test case which gives a non-empty string of length no more than 1000.</p>
<h3 id="output-specification-">Output Specification:</h3>
<p>For each test case, simply print the maximum length in a line.</p>
<h3 id="sample-input-">Sample Input:</h3>
<pre><code class="lang-in">Is PAT&amp;TAP symmetric?
</code></pre>
<h3 id="sample-output-">Sample Output:</h3>
<pre><code class="lang-out">11
</code></pre>
</div>