Please help me with this Bits Question!!!

Revision en1, by Spectacular_Lemma, 2023-08-05 12:25:37

Given an array A of size n and a target integer X, we need to find an array B such that ΣA[i]&B[i]=X (1<=i<=n).

If multiple answers are possible find the lexicographically smallest array B.

As constraints are unknown, I hope someone can help me to find suitable constraints too.

Tags bitmask, dp, array, ask, help me

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Spectacular_Lemma 2023-08-05 12:25:37 327 Initial revision (published)