Perfect Assignment — Solution & Editorial
Bitmask DP over assigned tasks: dp[mask] = min cost to assign the first popcount(mask) workers to the tasks in mask. (Hungarian algorithm scales to N = 500, but bitmask is enough here.)
Complexity: O(2N · N)
Bitmask DP over assigned tasks: dp[mask] = min cost to assign the first popcount(mask) workers to the tasks in mask. (Hungarian algorithm scales to N = 500, but bitmask is enough here.)
Complexity: O(2N · N)