https://codeforces.com/problemset/problem/1362/B
Sir above is the link of the problem and sir I am not understanding this below editorial please clear me this sir
Editorial -
Consider i-th least significant bit (0 indexed). If it is set in k, but not in s, it will be set in k⊕s. Hence k⊕s≥2i.
Consider such minimal positive integer m, that 2m>s holds for all s∈S. k cannot have the i-th bit set for any i≥m. From this follows that k<2m. So there are only 2m feasible choices of k. We can verify if a number satisfies the condition from the statement in O(n) operations. This gives us a solution with complexity O(n⋅2m). Note that in all tests m is at most 10.
There is also another solution possible. It uses the observation that if k satisfies the required conditions, then for every s∈S there exists such t∈S (t≠s) , that t⊕s=k. This gives us n−1 feasible choices of k and thus the complexity of this solution is O(n2)