Блог пользователя Druid

Автор Druid, 10 лет назад, По-английски

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 ?

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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