We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It seems to me that if there exists a solution, then there exists infinitely many solutions. For, given a solution S, simply add two occurances of any element to S. For instance, S + {3501, 3501} will also be a solution, and by the definition of multisets is a distinct multiset from S.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Prime XOR
You are viewing a single comment's thread. Return to all comments →
It seems to me that if there exists a solution, then there exists infinitely many solutions. For, given a solution S, simply add two occurances of any element to S. For instance, S + {3501, 3501} will also be a solution, and by the definition of multisets is a distinct multiset from S.