Append for OR Codechef Starters 73 (Rated till 6-Stars) problem solution
This post is all about the solution of the Append for OR Codechef Starters 73 (Rated till 6-Stars) problem solution.
Problem Statement:
Chef has a NN-length array AA.
Chef would like to append a non-negative integer XX to the array AA so that the bitwise OR of the entire collection becomes = Y=Y, i.e. (A 1 | A 2 | ldots | A N | X) = Y(A 1 A 2... A N X)=Y. (In this case, | denotes the bitwise OR operation.)
Find the smallest possible value of XX. If there is no possible value for XX, return -1.
Format of Input :
The number of cases will be indicated by a single integer TT in the first line of input.
Each test case's first and only line includes 2 space-separated integers NN and MM — the number of apples and oranges, respectively.
Format of the Output :
For every test case, output YES if the group is perfect and NO or else on a new line.
Each character can be printed in either uppercase or lowercase. The strings YES, yes, Yes, and yES, for example, are all considered identical.
Also Check this out:-
Chef Plays Ludo Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Multivitamin Tablets Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Lucky Numbers Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Append for OR Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
Consecutive Xor Codechef Starters 73 (Rated till 6-Stars) problem solution, Click Here
0 Comments