mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 11:43:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			34 lines
		
	
	
		
			1012 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1012 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>给定一个非空的正整数数组 <code>nums</code> ,请判断能否将这些数字分成元素和相等的两部分。</p>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>示例 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>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>nums = [1,2,3,5]
 | 
						||
<strong>输出:</strong>false
 | 
						||
<strong>解释:</strong>nums<strong> </strong>不可以分为和相等的两部分
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><meta charset="UTF-8" /></p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>1 <= nums.length <= 200</code></li>
 | 
						||
	<li><code>1 <= nums[i] <= 100</code></li>
 | 
						||
</ul>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><meta charset="UTF-8" />注意:本题与主站 416 题相同: <a href="https://leetcode-cn.com/problems/partition-equal-subset-sum/">https://leetcode-cn.com/problems/partition-equal-subset-sum/</a></p>
 |