Grey Codes to Binary and reverse

Правка en2, от RNR, 2017-03-16 20:41:06

UVa 11173 — Grey Codes with a one-liner bit manipulation expression for each test case, i.e. find the k-th Gray code.

Solution is k^(k>>1)

Let’s reverse the UVa 11173 problem above. Given a gray code, find its position k using bit manipulation.

Solution: ????

Теги bitmasks, binary, grey codes, gray code

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский RNR 2017-03-16 20:41:06 1
en1 Английский RNR 2017-03-16 20:36:24 308 Initial revision (published)