'''

```
bool canPartition(vector<int>& nums) {
int sum = 0;
for (int x : nums) sum += x;
if (sum & 1) return false;
int n = sum >> 1;
vector<bool> can(n + 1, false);
can[0] = true;
for (int x : nums)
{
for (int j = n; j >= x; j--)
{
can[j] = can[j] | can[j - x];
}
}
return can[n];
}
```

'''