https://www.codechef.com/viewsolution/36988728
https://www.codechef.com/viewsolution/36970005
Why is this happening? Any LOGIC behind it?
https://www.codechef.com/viewsolution/36988728
https://www.codechef.com/viewsolution/36970005
Why is this happening? Any LOGIC behind it?
Its all about precedence. Read the editorial
@anon48121329, In the first code, it is written a[i] & a[j] == a[i] which is not correct as & operator prefers reading == first. So you need to do this (a[i]&a[j]) == a[i], which will result into AC
Thanks for info mate