Problems > Fairest Split > Editorial

Fairest Split — Solution & Editorial

Back to the Problem

N ≤ 16 invites 2N enumeration of subsets: each mask's sum s gives difference |total − 2s|. (Meet-in-the-middle scales to N = 32.)

Complexity: O(2N · N)