You are viewing a single comment's thread. Return to all comments →
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; int A=0,c; int i=a; while(i<=b) { int j=a++; while(j<=b) { c=i^j; A=max(A,c); j++; } i++; } cout<<A; }
Seems like cookies are disabled on this browser, please enable them to open this website
Maximizing XOR
You are viewing a single comment's thread. Return to all comments →