Hey guys, I was looking at solution to the problem BITS: http://codeforces.me/contest/484/problem/A . I found a line of code i couldn't understand: for(ll i = x ; i <= y ; i += ( ~ i& — ~ i)) ans = i;
what does ( ~ i & — ~ i ) do ?
Thank You
Trouble with Bitwise
Hey guys, I was looking at solution to the problem BITS: http://codeforces.me/contest/484/problem/A . I found a line of code i couldn't understand: for(ll i = x ; i <= y ; i += ( ~ i& — ~ i)) ans = i;
what does ( ~ i & — ~ i ) do ?
Thank You