how the series of 4 7 was calculated in the webinar video of bitmasking
Bitmasking 4 7 series
in two hour 27 min video which part of video you are talking about please specify .
The last part , question of codeforces, how to find which number is that number in the series
4 7 44 47
You can do without P & C. See you have only 4 and 7 , so if you want to get ith lucky number then follow this-:
Change into decimal as usual you do for binary to decimal,and when you do so just multiply with 1 whenever you find 4 and whenever you find 7 multiply with 2. See example you will definitely understand-
For Example; For number 44- We convert it into decimal as in form of binary , start from last so for last digit - its 2 raise to power 0 multiply 1(as it is 4) + 2 raise to power 1 multiply 1(as it is 4) , so 44 is 11 +21=3 and we can see
4 -1st
7-2nd
44-3rd
47-4th…
Similarly for 47 —(as we get 7 so we multiply with 2 and for 4 we multiply with 1 , so it will be 2pow(2,0) +1pow(2,1) = 21+12 = 4th.
and sory for late response i was in train 