reimplemented solution to UVa 12455 - Bars, without bitset, using bitmasks only, as the top limit of the bit set size is 20, which can easily be covered by the int bitmask (up to 32 bits)