i am not able to understand what we have to do actually in this problem
XOR profit problem
Hey @jatinupadhyay786
you are given two integers x and y, there can be many pairs of a and b such that x<=a,b<=y. You can calculate a xor b for all these pair. Out these pairs you need find that pair which gives maximum value of a xor b. Let’s say if x = 2, and y = 4
the pairs (a, b) should be such that both lie in the range [x, y] and a <= b
so
the possible pairs are:-
2 and 2
2 and 3
2 and 4
3 and 3
3 and 4
4 and 4
you’ve to find the xor of all these pairs and return the maximum.
my code is working fine for the given input but its not getting submitted
here is my code https://ide.codingblocks.com/s/293500