Questions tagged [bit-manipulation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
91 views

Given matrix, count paths visiting each number exactly once

We are given matrix of size at most $21$ by $21$, each number of the matrix is either $-1$, which means empty element, or integer between $1$ and $21$. Each integer may occure several more times in ...
2
votes
1answer
143 views

For given set of integers, find and count the pairs with maximum value of bitwise or

Let's say we have given set of integers $A = \{x_1, x_2, x_3, x_4, \dots, x_n\}$, consisting of exactly $n$ values, all of them positive integers. Now the problem is to find the maximum value of ...