Help me in solving BITPLAY problem

My issue

can anyone explain the question ?? after solving i realised i have not understood the problem fully

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	long long t;
	cin>>t;
	while(t--){
	    long long n;
	    cin>>n;
	    string arr;
	    cin>>arr;
	    int i=0;
	    long long count=0;
	    while(i<n-2){
	        int a=arr[i]-48;
	        int b=arr[i+1]-48;
	        int c=arr[i+2]-48;
	        if((a ^ b)==c) count++;
	        if((a & b) == c) count++;
	        if((a | b) ==c) count++;
	        i=i+2;
	    }
	    cout<<count<<endl;
	}
	return 0;
}

Problem Link: BITPLAY Problem - CodeChef

Edge case which many might miss - Firstly if there is any case like 001 then none of the operations can satisfy it. Because 0^0 or 0|0 or 0&0 all gives 0 (NOT 1). In this case you have break and print 0.

In all other cases you have to multiply the possibilities. (This should click because it is saying to take modulus with 1e9+7 => This much big number can only occur if multiplication is involved). Just multiply with previous count rather than adding.