Largest Subset with Bitmasking

What is wrong with this code? I have tested it with many inputs. Can someone take a look?

Code link

The code is not passing a single test case, and exits with a run error.