Skip to main content

Maximum Subset XOR

Challenge on lesson: Checkpoint — The Small-n Law

CHALLENGE
Difficulty: advanced+25 XP

**Bài toán.** Given n non-negative integers, print the maximum XOR over all non-empty subsets. **Constraints:** 1 ≤ n ≤ 20; 0 ≤ a[i] ≤ 10^9. **Hint:** compute the budget first. 2^20 = 1 048 576 — the brute force fits with three orders of magnitude of margin.

Back to lesson: Checkpoint — The Small-n Law