Some error occured while loading page for you. Please try again.
Welcome to the last day! Today, we're discussing bitwise operations. Check out the Tutorial tab for learning materials and an instructional video!
Given set . Find two integers, and (where ), from set such that the value of is the maximum possible and also less than a given integer, . In this case, represents the bitwise AND operator.
The first line contains an integer, , the number of test cases.
Each of the subsequent lines defines a test case as space-separated integers, and , respectively.
For each test case, print the maximum possible value of on a new line.
All possible values of and are:
The maximum possible value of that is also is , so we print on a new line.