bro pls your videos are wonderfool so can you do editorial in each contest. it will be very good for you and for you subscribers : ) Who is agree like pls ; )
Great video. But it did sound like you were feeling sleepy during recording. Nonetheless I really look forward to another one from you. PS: I subscribed.
we will do the division operation when x is divisible by y we want to figure out how many times we will increment x before it is divisible by y currently the remainder is = x%y if we add diff + x%y to get our new remainder after incrementing x by diff times , we get: y - x%y + x%y = y and trivially y is divisible by y
Cool editorial, wanna see these videos becoming regular
bro pls your videos are wonderfool so can you do editorial in each contest. it will be very good for you and for you subscribers : )
Who is agree like pls ; )
Great video. But it did sound like you were feeling sleepy during recording. Nonetheless I really look forward to another one from you.
PS: I subscribed.
i think we need to put if (prefix[x] - prefix[i] = l)
another and condition in if to ge t correct ans.
hi, we don't need the prefix[x] - prefix[i] >= l part because the lower_bound function already makes sure this is true
@@BoraDemirtas ok thanks man
orz, thank you for your effort.
how much time did it took you.
Does the process of making this kind of editorial get faster after each iteration?
1. this one took 12ish hours
2. last one took 25ish hours but i haven't made enough to conclusively say anything
cool explanation bro
How did you come up with the diff = y - x%y;
we will do the division operation when x is divisible by y
we want to figure out how many times we will increment x before it is divisible by y
currently the remainder is = x%y
if we add diff + x%y to get our new remainder after incrementing x by diff times , we get:
y - x%y + x%y = y
and trivially y is divisible by y
nice explanations in very short time
Thanks
This is *really* cool, Manim editorials are like the highest quality haha.
:D Thank youu
Thanks a lot for this.
For this problem I think greedy approach Is more intuitive than Dynamic Programming Approach. Well Nice Explanation
5:43 could you please help, didn't understand what we did with the lower bound function here
it returns the first index that an array is greater than or equal to a specified value
thankyou
int n,l,r;
cin>>n>>l>>r;
vectora(n);
for(auto &ele:a)
cin>>ele;
long long sum = 0;
int ans = 0;
for(int i=0;i= l && sum r){
if(a[i]>= l && a[i]
Hey ! My logic was also the same and my code was also failing :( ! Have u got the reason that why it is failing?