CF 1975F - Set

Rating: 2600
Tags: bitmasks, brute force, combinatorics, dfs and similar, divide and conquer, dp, math
Solve time: 5m 17s
Verified: no

Solution