Wax's blog

By Wax, history, 16 months ago, In English

I am suffering from bitwise trauma! I can solve same rating other problems but on same rating bitmask problem,I got stuck in it,....

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

»
16 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

Solve problems from Codeforces with difficulty ratings between 900 and 1500 that are tagged with bitmasks. For each problem, visualize the logic using bit-level representations. Focus on helping understand how bit manipulation or bitmasking is used in the solution.

»
16 months ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

I would suggest you to watch some videos on bitwise operators and learning about a few identities. Also, learn how to manipulate kth bit of a number. Also, when faced with certain bitmasks (at unrated level), try this thing, first try to solve it for a binary string instead of an actual array of numbers. Then just repeat the solution for 32 (or 64) binary strings combining to form the numbers.