Xor problem

Правка en1, от bassuniz, 2025-11-04 20:24:58

Yesterday, I was curious about this problem

Problem

You’re given an array

$$$ a = [a_1, a_2, \dots, a_n] $$$

You must construct another array

$$$ b = [b_1, b_2, \dots, b_n] $$$

(with any integer values) such that the value

$$$ (a_1 \oplus b_1) \oplus (a_2 \oplus b_2) \oplus \dots \oplus (a_n \oplus b_n) $$$

is maximized.

Here, “⊕” denotes the bitwise XOR operation.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский bassuniz 2025-11-04 20:26:28 0 (published)
en3 Английский bassuniz 2025-11-04 20:26:07 45
en2 Английский bassuniz 2025-11-04 20:25:36 90
en1 Английский bassuniz 2025-11-04 20:24:58 427 Initial revision (saved to drafts)