1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/分割等和子集 [NUPfPr].html
2022-03-29 12:43:11 +08:00

34 lines
1012 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给定一个非空的正整数数组 <code>nums</code> ,请判断能否将这些数字分成元素和相等的两部分。</p>
<p>&nbsp;</p>
<p><strong>示例&nbsp;1</strong></p>
<pre>
<strong>输入:</strong>nums = [1,5,11,5]
<strong>输出:</strong>true
<strong>解释:</strong>nums<strong> </strong>可以分割成 [1, 5, 5] 和 [11] 。</pre>
<p><strong>示例&nbsp;2</strong></p>
<pre>
<strong>输入:</strong>nums = [1,2,3,5]
<strong>输出:</strong>false
<strong>解释:</strong>nums<strong> </strong>不可以分为和相等的两部分
</pre>
<p>&nbsp;</p>
<p><meta charset="UTF-8" /></p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 &lt;= nums.length &lt;= 200</code></li>
<li><code>1 &lt;= nums[i] &lt;= 100</code></li>
</ul>
<p>&nbsp;</p>
<p><meta charset="UTF-8" />注意:本题与主站 416&nbsp;题相同:&nbsp;<a href="https://leetcode-cn.com/problems/partition-equal-subset-sum/">https://leetcode-cn.com/problems/partition-equal-subset-sum/</a></p>