Actually the video was very beginner friendly and i want to thank you and i want to request you to continue to post videos.Thank you I and my friends will be waiting for your video solutions after every contest hope you will post .
@@sdmfslkdm thike toh aapne pehla step complete kardiya. Abhi contraints 1e6 hote 1e9 ke badle toh directly brute force se OR kardete hum. But yaha pe waisa nahi tha Toh bitmasking mai dusra ek hi option bachta hai. Every bit ko check karna Phir ye sochna hai ki pure range maise atleast ek number mai bit set hai toh pure ans mai wo bit set hojaata hai.
Accepted Solution Link : codeforces.com/contest/1981/submission/263455461
Actually the video was very beginner friendly and i want to thank you and i want to request you to continue to post videos.Thank you
I and my friends will be waiting for your video solutions after every contest hope you will post .
Thank you so much for the kind words 😄
Great Video. Just Subscribed
while(L
Constraints for L and R were 1e9
So a loop from l to r would be O(1e9) at worst case which is why we shouldnt go with that approach
@@formidablechief27nahi bro. He is taking or... Maximum 31 operations for this problem with this code se clearly
how did you think of this approach?
Best explanation 😊
beginner friendly explanation
Great explanation and technique
Thank you bhaiya ❤
thank you a lot, please keep it up!
How to implement isset function in c++ here??
boolean isSet(long x, long bit) {
return ((x >> bit) & 1L) == 1L;
}
This is my implementation in java
For c++ just long long will come in place of long
Nice!
Nice sirji
bhaiya how to improve mere dimag me ni ate approches
aap ye question mai konse point tak soch paye the ?
phir aage batata hu
@@formidablechief27 n-m to n +m OR lena hai wo smj gya tha
@@sdmfslkdm thike toh aapne pehla step complete kardiya. Abhi contraints 1e6 hote 1e9 ke badle toh directly brute force se OR kardete hum.
But yaha pe waisa nahi tha
Toh bitmasking mai dusra ek hi option bachta hai. Every bit ko check karna
Phir ye sochna hai ki pure range maise atleast ek number mai bit set hai toh pure ans mai wo bit set hojaata hai.
@@formidablechief27 acha got it