Hello codeforces community , can you please suggest me some Bitmask beginner problems ? I am beginner at bitmask . Just Bitmask problems , not Bitmask Dp . Hope someone will suggest me . :)

Before contest

Codeforces LATOKEN Round 1 (Div. 1 + Div. 2)

17:53:47

Register now »

Codeforces LATOKEN Round 1 (Div. 1 + Div. 2)

17:53:47

Register now »

*has extra registration

# | User | Rating |
---|---|---|

1 | Radewoosh | 3707 |

2 | Benq | 3691 |

3 | tourist | 3669 |

4 | ecnerwala | 3565 |

5 | Um_nik | 3533 |

6 | ksun48 | 3489 |

7 | maroonrk | 3457 |

7 | jiangly | 3457 |

9 | Petr | 3370 |

10 | scott_wu | 3350 |

# | User | Contrib. |
---|---|---|

1 | 1-gon | 208 |

2 | awoo | 187 |

3 | rng_58 | 184 |

4 | Errichto | 182 |

5 | SecondThread | 178 |

6 | Radewoosh | 176 |

6 | -is-this-fft- | 176 |

8 | maroonrk | 175 |

9 | Um_nik | 174 |

10 | antontrygubO_o | 171 |

Hello codeforces community , can you please suggest me some Bitmask beginner problems ? I am beginner at bitmask . Just Bitmask problems , not Bitmask Dp . Hope someone will suggest me . :)

↑

↓

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/13/2021 00:41:13 (j1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

It is quiet difficult to find easy problems that require just the use of bitmasks.

Bitmasks are often used to represent states (that's why they are frequently used in DP problems)

First it's important to learn some basic operations with bitmasks

Bitmasks can be used to represent sets, if the ith bit is on, then the ith object is included in some set. You can do some set operations.

Print all the subsets from a setOnce you understand how bitmasks work (and how to use them in your programming language), you can solve problems like this one:

Given an array

Aof at most 20 integers, you must count the number of subsequences from this array which have positive sumUsing bitmasks you can solve this problem in

O(n2^{n}), this is not neccessarily the best solution, but it's just an exampleI wrote this problem some time ago.

This one doesn't require DP, but it's not that easy though.

You can take a look at Hackerrank too, they have lots of tutorial about some programming techniques, including the use of bitmasks.

Can you kindly explain how to solve the no. of subsequences with +ve sum ?