TuHoangAnh's blog

By TuHoangAnh, history, 4 years ago, In English

in this problem 1682B - AND Sorting, with the input:

1

8

0 1 2 7 4 5 3 6

it seems like the answer is not correct, if im wrong, pls point out my mistakes.

  • Vote: I like it
  • -13
  • Vote: I do not like it

»
4 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

It's correct. Only 3,6,7 are out of place. You need to swap them to make them occupy correct location. Their AND value is 2 which is the answer. Code for reference : 158037115