online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <iostream> using namespace std; #include <iostream> #include <bits/stdc++.h> using namespace std; bool binarySearch(int i, int j, int d, int arr[]) { if (i <= j) { int mid = i + (j - i) / 2; if (arr[mid] == d) { return true; } if (arr[mid] > d) { return binarySearch(i, mid - 1, d, arr); } return binarySearch(mid + 1, j, d, arr); } return false; } int main() { bool ans = false; int n; cin >> n; int arr[100000]; for (int i = 0; i < n; i++) { cin >> arr[i]; } if (n >= 130) { cout << "Yes" << endl; } else if (n < 130) { sort(arr, arr + n); for (int i = 0; i < n; i++) { bool isBreaking; for (int j = i + 1; j < n; j++) { for (int k = j + 1; k < n; k++) { int d = arr[i] ^ arr[j] ^ arr[k]; cout << d << endl; ans = binarySearch(0, n, d, arr); // cout << " ans : " << ans << endl; if (ans) { cout << "Yes" << endl; goto break_me; } } } } break_me: if (!ans) { cout << "No" << endl; } } return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue