I have made a video discussing the solution for the problem Chef and Bitwise Product under May long challenge 2020. I hope it helps you understand the solution.
If you have any doubts regarding the video and this problem, please do post them here.
Can you please explain, why the time complexity is logR?
I’m facing problem in understanding what is the significance of curr in your code. If possible can you share photo by dry running your code on paper.
say i am at bit position i from left. curr will simply store the R value considering only bits till position i-1 form left.
@vedhant brother have i done that what u have explained in vdo
my code does not pass subtask 3
I cant understand where is the bug
it gives WA in all test cases??
#define ll long long int
int compare(const void * a, const void * b)
return ( (int)a - (int)b ); }
void solve(ll t)
qsort(a,64, sizeof(ll), compare);
if((x&p)==0 && (y&p)==0 && (ans-p)>=l)
i am getting correct solution of the example test cases, but when submitted its showing tle can u tell how to get rid of it
plz make a video on explaining your code
yeah please explain the code as well!!
please make a video!!