Editorial for DMOPC '15 Contest 3 P5 - Total Annihilation
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Knowledge required: meet-in-the-middle
Anyone with knowledge of the subset sum problem probably recognized this problem immediately. For anyone who does not know, the subset sum problem is one of the most famous NP-complete problems, you can learn more about it here.
If we add all samples to one array, with the antimatter samples being negative, the problem is reduced to finding the number of subsets that sum to
Time Complexity:
Bonus: Can you solve this problem using meet-in-the-middle?
Comments