Блог пользователя cyber_simar

Автор cyber_simar, история, 4 часа назад, По-английски

Given an array A of length n(n≤105, ai<250), divide it into two subsequences X and Y such that (x1|x2...) ⊕ (y1|y2...) is maximum. Print the maximum OR(X) ⊕ OR(Y).

Any help would be appreciated. Thanks!

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
4 часа назад, # |
Rev. 3   Проголосовать: нравится +6 Проголосовать: не нравится

i believe you need to know a technique called XOR basis to solve this. its the same as this problem https://atcoder.jp/contests/abc141/tasks/abc141_f

»
4 часа назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by cyber_simar (previous revision, new revision, compare).