# Solution 1 dp

if sum is odd, then return false

state definition:

dp\[i]\[j] means select numbers from index of \[0, i], and very numbers can only bu used once, let sum of these numbers to be j.

if j < nums\[i], 则要和为 j 的情况下，不能选 nums\[i]，则 dp\[i]\[j] = dp\[i-1]\[j]

if j >= nums\[j], 则可以选也可以不选

dp\[i]\[j] = dp\[i-1]\[j] || dp\[i-1]\[j-nums\[i]]


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://851958789.gitbook.io/notes/0416_partition_equal_subset_sum/slt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
