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 Round #647 (Div. 1) - Thanks, Algo Muse!

27:21:53

Register now »

Codeforces Round #647 (Div. 1) - Thanks, Algo Muse!

27:21:53

Register now »

*has extra registration

Before contest

Codeforces Round #647 (Div. 2) - Thanks, Algo Muse!

27:21:54

Register now »

Codeforces Round #647 (Div. 2) - Thanks, Algo Muse!

27:21:54

Register now »

*has extra registration

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

1 | MiFaFaOvO | 3681 |

2 | Um_nik | 3544 |

3 | maroonrk | 3431 |

4 | tourist | 3409 |

5 | apiadu | 3397 |

6 | 300iq | 3317 |

7 | ecnerwala | 3260 |

7 | Benq | 3260 |

9 | LHiC | 3229 |

10 | TLE | 3223 |

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

1 | Errichto | 193 |

2 | antontrygubO_o | 191 |

3 | vovuh | 178 |

4 | pikmike | 177 |

5 | tourist | 166 |

6 | Um_nik | 165 |

7 | McDic | 164 |

8 | ko_osaga | 163 |

9 | Radewoosh | 161 |

10 | Geothermal | 158 |

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-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/03/2020 14:13:08 (g1).

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 ?