C++ code. In this code, I got confused while I read the code. As you can see (i & (j<<1)) in that condition does it mean an odd number? Please let me know (i & (j<<1)) what does it mean is and how does it work?
void solve()
{
int n, l, r, x;
cin >> n >> l >> r >> x;
int a[1000];
for(int i=0; i<n; i++)
cin >> a[i];
int ans=0;
for(int i=0; i< (1<<n); i++)
{
if(__builtin_popcount(i) >= 2)
{
int mx=0;
int mn=INT_MAX;
int sum=0;
for(int j=0; j<n; j++)
{
if(i & (1<<j)) /// What does it mean ??
{
sum+=a[j];
mx=max(mx, a[j]);
mn=min(mn, a[j]);
}
}
if(l <= sum && sum<=r && mx-mn>=x)
ans++;
}
}
cout << ans << '\n';
}