I was unable to solve this question and i want to know what i missed
Given a binary string Q of length <=10^5, find total no of pairs which satisfy following conditions i+j <= X (where X is less than Q) i xor j = X return the answer in Modulo 10^9+7
Time Limit:- 2s
My approach :- Converted the input to decimal and iterated over lower half of the DP array to find such pairs. Each match increased the count by +2 as i was accounting for both of the possible pairs.
Yup by the time I realised its difficulty. It was too late to pull up so i kept trying.
I hope @cubefreak777 aka L2 might be able to give some good insight on it
Yup now when i checked my solution. This is what i used though i didn’t remeber why.
PS:- Community here is really nice. I posted this question on codeforces and got half hearted response.
Thankyou @suman_18733097,cubefreak777