• + 0 comments
        result|=arr[i];
        int ans=1;
        for(int i=0;i<n-1;i++){//use this method for calculting power of 2
            ans=(ans*2)%mod;
        }
        cout<<(result*ans)%mod<<endl;