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

Автор blackCurtain, 11 лет назад, По-английски

Given an array of 100 integers(64bit signed). Task is to pick a subset for which the xor of the elements of the subset is maximized.

Example : 1= 01 3= 11 2= 10

if we pick 1,2 then their xor is maximum (01 ^ 10 = 11). also we can pick only 3 but the maximum result is 3 anyhow.

The original problem is described in the following link: http://www.lightoj.com/volume_showproblem.php?problem=1272

This problem is included in Gaussian Elimination section but I can't find how GE can be applied to this problem.

Can anybody give me any hints? It would be helpful. Thanks in advance.

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

»
11 лет назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

This problem is an easy version of 251D - Two Sets. You can read the Editorial for this that problem for get some ideas. If you need some implementation details check my solution 3466112. I hope this can help you.

»
9 лет назад, # |
  Проголосовать: нравится +25 Проголосовать: не нравится

Over the next 9 days many people will need help with this topic.

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

I tried this Problem using Gaussian elimination. Here is my solution — http://ideone.com/kPsoAm But, it's giving the wrong answer while submitting to https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2683. Do pls, help a bit. Test case, where it may fail will be appreciated or if possible, error in the code too.