mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 15:01:40 +08:00
存量题库数据更新
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<p>你会得到一个字符串 <code>text</code> 。你应该把它分成 <code>k</code> 个子字符串 <code>(subtext1, subtext2,…, subtextk)</code> ,要求满足:</p>
|
||||
|
||||
<ul>
|
||||
<li><code>subtext<sub>i</sub></code><sub> </sub>是非空字符串</li>
|
||||
<li><code>subtext<sub>i</sub></code><sub> </sub>是 <strong>非空 </strong>字符串</li>
|
||||
<li>所有子字符串的连接等于 <code>text</code> ( 即<code>subtext<sub>1</sub> + subtext<sub>2</sub> + ... + subtext<sub>k</sub> == text</code> )</li>
|
||||
<li><code>subtext<sub>i</sub> == subtext<sub>k - i + 1</sub></code><sub> </sub>表示所有 <font color="#c7254e"><font face="Menlo, Monaco, Consolas, Courier New, monospace"><span style="font-size:12.6px"><span style="background-color:#f9f2f4">i</span></span></font></font> 的有效值( 即 <code>1 <= i <= k</code> )</li>
|
||||
<li>对于所有 <font color="#c7254e"><font face="Menlo, Monaco, Consolas, Courier New, monospace"><span style="font-size:12.6px"><span style="background-color:#f9f2f4">i</span></span></font></font> 的有效值( 即 <code>1 <= i <= k</code> ) ,<code>subtext<sub>i</sub> == subtext<sub>k - i + 1</sub></code> 均成立</li>
|
||||
</ul>
|
||||
|
||||
<p>返回<code>k</code>可能最大值。</p>
|
||||
@@ -31,15 +31,7 @@
|
||||
<pre>
|
||||
<strong>输入:</strong>text = "antaprezatepzapreanta"
|
||||
<strong>输出:</strong>11
|
||||
<strong>解释:</strong>我们可以把字符串拆分成 "(a)(nt)(a)(pre)(za)(tpe)(za)(pre)(a)(nt)(a)"。
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 4:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>text = "aaa"
|
||||
<strong>输出:</strong>3
|
||||
<strong>解释:</strong>我们可以把字符串拆分成 "(a)(a)(a)"。
|
||||
<strong>解释:</strong>我们可以把字符串拆分成 "(a)(nt)(a)(pre)(za)(tep)(za)(pre)(a)(nt)(a)"。
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
Reference in New Issue
Block a user