I found on many books regarding bitmasks and found out it is great way of representing selections,status, sets etc. But everywhere they have used an integer or long long int to define a bitmask. But that has a max capacity of 64/128 bits. How to represent more items with bits?
Look for
bitset
data structure in different programming languages.Or simple use array of integers required length. For example if you have array
a
of64-bits
numbers then you can working withi-th
bit something like this:Can this problem be done using bitset?
https://www.codechef.com/COOK82/problems/COOK82D
No. Hint: Eulerian cycle.