I passed almost every case,but failed at [100,100....],which is a int[100],and every element in it is 100.

```
public class Solution {
public boolean canPartition(int[] nums) {
if(nums.length==0)return false;
int sum=0;
for(int n:nums){
sum += n;
}
if(sum%2==1)return false;
int[] dp = new int[sum/2+1];
dp[0] = 1;
for(int i = 1;i<nums.length;i++){
for(int j = sum/2;j>=nums[i-1];j--){
dp[j] += dp[j-nums[i-1]];
}
}
return dp[sum/2]>0;
}
}
```