Two Equal Piles — Solution & Editorial
The total must be even, and then it reduces to subset-sum for total/2 — same bitset DP.
Complexity: O(N·sum / 64)
The total must be even, and then it reduces to subset-sum for total/2 — same bitset DP.
Complexity: O(N·sum / 64)