https://codeforces.com/problemset/problem/1395/C
I have completed the question. I have a doubt in the time complexity of the problem. I saw the tutorial and found out the time complexity of the problem. This is the tutorial:
“Suppose the answer is A. Thus for all i (1≤i≤n), ci|A=A
Since ai,bi<29, we can enumerate all integers from 0 to 29−1, and check if there exists j for each i that (ai&bj)|A=A . The minimum of them will be the answer.
The time complexity is O(2^9 * n * 2).”
My doubt is the time complexity of bitwise and operation is not considered. If it was considered then the time complexity should be O(2^9 * n * 2 * 9 ). Then it will cross 10**7. Then it should be TLE right? Is bitwise And operation considered O(1).