1097B — Petr and a Combination Lock

Правка en3, от ayush29azad, 2021-08-11 09:40:51

How to solve this problem using bitmask or bit manuplation ??

Problem Link :https://mirror.codeforces.com/problemset/problem/1097/B Editorial Link :https://mirror.codeforces.com/blog/entry/64310

I am not able to understand the editorial which says that clockwise rotation will be done if ith bit is set to 0 and vive versa ?? Can someone explain in detail ?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский ayush29azad 2021-08-11 09:40:51 9 Reverted to en1
en2 Английский ayush29azad 2021-08-11 09:40:12 9 Tiny change: 'm/1097/B\n**Editor' -> 'm/1097/B\n[cut]\n**Editor'
en1 Английский ayush29azad 2021-08-11 09:39:40 397 Initial revision (published)