Here’s my solution, which is getting WA CodeChef: Practical coding for everyone
The solution which got accepted of some random guy is this: CodeChef: Practical coding for everyone
Solution is similar, since the hint has been discussed in a tutorial video of bitmasking by coding blocks. But what concerns me is, although we both implemented in same way, why his is getting AC while mine is getting WA.