Need help on meet-in-the-middle problem

Revision en1, by Kerekiw, 2021-11-10 10:30:14

You are given an array a(1 <= ai <= 1e9) of length n(1 <= n <= 25). You need to choose two non-empty disjoint subsets with the same sum. Print the maximum possible sum among such pairs of subsets.

My solution gets TLE when n is 25 -> https://pastebin.com/B5nRW1pZ

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Kerekiw 2021-11-10 10:30:14 305 Initial revision (published)