Please read the new rule regarding the restriction on the use of AI tools. ×

Help needed dp bit mask problem

Revision en2, by charan2628, 2022-03-09 10:31:39

This is the problem minimum-cost-to-connect-two-groups-of-points, please go through it. I'm stuck at this point:
1. At each level (here each level mean each point in group 1) if I'm iterating different subgroups of group2 to connect, how to efficiently calculate the cost for the new connections excluding the connections already connected in previous level?
2. Or is there another way to do it?

Tags dp, bitmask

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English charan2628 2022-03-09 10:31:39 52 Tiny change: 's point:\n- At each le' -> 's point:\nAt each le'
en1 English charan2628 2022-03-09 09:02:52 530 Initial revision (published)