Bitwise anding interesting question. Simple yet not so simple.

Правка en1, от abhaypatil2000, 2021-11-12 23:33:44

Given an array $$$A$$$ of $$$n$$$ integers, the elements are shuffled to form an array $$$B$$$.

Let the array $$$B$$$ be $$$b_0,b_1,...b_{n-1}$$$.

We define $$$f_i = b_0$$$&$$$b_1$$$&$$$... b_i$$$.

We need to find the minimum possible value of $$$\sum_{i=0}^{n-1} f_i$$$.

Теги bitwise operators, array, minimization

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский abhaypatil2000 2021-11-13 01:19:34 145
en3 Английский abhaypatil2000 2021-11-13 01:15:07 1226
en2 Английский abhaypatil2000 2021-11-12 23:35:13 67 Tiny change: 'nstraints:\n1 <= n <= 1000\n0 <= $b_' -> 'nstraints: \n1 <= n <= 1000 \n0 <= $b_'
en1 Английский abhaypatil2000 2021-11-12 23:33:44 322 Initial revision (published)