CF 1670F - Jee, You See?

Rating: 2400
Tags: bitmasks, combinatorics, dp
Solve time: 49s
Verified: no

Solution

Working