SPOJ problem YODANESS, query?

I’ve solved YODANESS using BIT, but problem tag say it can be solved using graph and bitmask also, any insight into how it can be solved using graph and bitmask?