My issue
I am getting the intuiton behind the question. How do we know that if x is 2 to power something we get -1.
My code
#include <bits/stdc++.h>
#define endl '\n'
#define int ll
using namespace std;
typedef long long ll;
void solve(){
int x; cin>>x;
// vector<int> v(n); for(int i=0;i<n;i++) { int x; cin>>x; v.push_back(x); }
if(x%2!=0) { cout<<-1<<endl; return;}
else{
}
}
signed main() {
ios_base::sync_with_stdio(0);cin.tie(0); cout.tie(0);
int t; cin>>t;
while(t--)
solve();
}
Problem Link: XORABC Problem - CodeChef