Druid's blog

By Druid, 10 years ago, In English

Currently i encountered a Div2-500 Problem at SRM 331 here

When I checked the editorial and the solutions , I found nearly all the solutions the users submitted or the author talked in the editorial was by using bitmask

Why it was so obvious for many users that it can be solved using Bitmasks ?

What are the keywords of a problem that tells us that it can be solved by Bitmasks ? What are the best bitmask problems for someone to start with ?

  • Vote: I like it
  • -3
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

usually bitmasking is a method used to try every possible solution by choosing a subset from a given set .... here in this problem it appears that the input size is small (i.e : 30) so you can try to take all possible subsets from the given set and just check if it works ... and among all working subsets you choose the minimum one