I've been laughing for 5 minutes straight when Shayan started with "Salam guys how are you doing" said hello in Farsi unintentionally and didn't notice.😂
Hi Shayan Love your editorials, keep up the great content. Actually I asked this question in stream too when you were solving a question I was able to get some advice from the viewers but I wanted to get your advice too. I am a Max Specialist, I generally have a performance rating of 1600-1700 in Div3, Educational and Div4's but in Normal Div 2 rounds I always seem to struggle. I dont know what happens. In almost all educational I am able to solve 3 questions in about 50 mins or 1 hour but in normal Div 2 rounds I am generally able to solve just 2 or If i do 3 I am not able to do them fast enough. And in the worst case sometimes just 1(like today). And since most of the contests are Div2 my ratings takes quite a bit of a hit because of this. And I dont want to skip the Div 2's since eventually I am going to have to perform well in them to grow beyond a certain level. Any Advice on how I can improve here?
Hi Shayan, thanks for your efforts to make a good editorial. I think problem B1's solution has a ' out of bound' risk because there is no bound checking for j and L or I'm making a mistake?
Can you explain that why are we doing last-=c1 ? here c1 will denote the number of times we can perform the ops on v1 such that it still remains less that v2. but i dont understand why do we need to subtract it.
update : undetstood the reason it is because if we perform the last number of steps on v2 it will be lot bigger than v1 , since we need the minimum number of steps we remove the number of steps for which v1 < v2 ensuring , to ensure after performing the steps v2 gets to a minimum value that is greater than v1.
Hello In problem B1, I have the similar approach but I used unordered_map to store the count, it is giving wrong answer in pretest7, how to debug the error as the testcases are not shown?
In problem A, why can't we start filling from the first cell that is (1,1)? will we consider it as a diagonal also? why do we start filling from the middle one?
Hi, There will be some money left after the first step (because we can pick limited numbers of flower type 1, at most p[i].second) So, we greedily have to pick as many flower type i + 1 as possible and it won't be necessarily 0.
For problem B2, what if i greedily buy flowers of type (i + 1) and then buy flowers of type (i) from the remaining. I was using this configuration and then trying to adjust the current solution to the optimal solution but was not able to do it. Can someone help ?
you need to buy more than 1 type(i) flower for every type(i+1) flower u sell in order to improve the answer (using while loop). Cos if you sell 1 type(i+1) and buy 1 type(i) your answer gets worse by 1.
Take the case where petals, quantity={(7,2),(6,3)} and maxmoney=18 or 13 here we have to use sliding window technique. Which worked with few minor adjustments for B1 but for B2 this will result in TLE for sure, so I gave up this approach 😂
Problem C was insane! Thank you for making it easy!
Most welcome
Damnnn great content, best guys for post contest tutorials!!
btw you like a kashmiri indian.
Lol
Thank you!
Loved the content, subbed
Thanks man!
I've been laughing for 5 minutes straight when Shayan started with "Salam guys how are you doing" said hello in Farsi unintentionally and didn't notice.😂
😂😂 I tried to act like nothing special has happened
Everyone knows that much nothing awkward ig 😂
I also thought does Shayan know 'Amharic' since 'Salam' means hello, hi ... in 'amharic'.
thank you for the editorial !
Most welcome!
Hi Shayan
Love your editorials, keep up the great content.
Actually I asked this question in stream too when you were solving a question I was able to get some advice from the viewers but I wanted to get your advice too.
I am a Max Specialist, I generally have a performance rating of 1600-1700 in Div3, Educational and Div4's but in Normal Div 2 rounds I always seem to struggle. I dont know what happens.
In almost all educational I am able to solve 3 questions in about 50 mins or 1 hour but in normal Div 2 rounds I am generally able to solve just 2 or If i do 3 I am not able to do them fast enough. And in the worst case sometimes just 1(like today).
And since most of the contests are Div2 my ratings takes quite a bit of a hit because of this. And I dont want to skip the Div 2's since eventually I am going to have to perform well in them to grow beyond a certain level.
Any Advice on how I can improve here?
I am also going through this stage : (. Hopefully I'll become CM within a year with a lot of practice
Hi,
Thank you!
I will definitely cover it in the upcoming livestreams. I will have some dedicated livestreams for discussing such things.
thanks a lot! also, would be even better if u take some test cases as examples for explanation
Sure.
Will do in the next ones
great explanation!
Glad you liked it
Thanks for the video editorial
Thank you for the support!
Loved the explanation, great going Shayan. Btw you look Indian but your accent is of the states.
👏👏
Do I really? Lol
Never noticed it
So, the inference I got from problem C is this : if a^(2) > b^(1) and a b^(2x) and a^(2x)
Hi Shayan, thanks for your efforts to make a good editorial.
I think problem B1's solution has a ' out of bound' risk because there is no bound checking for j and L or I'm making a mistake?
Awesome explanations 🎉
Glad you liked it
If it possible, you should turn off background possible, it is very distracting!
background animation*
I see. I will put a vote in the Telegram channel about it to ask what to do. Thanks for mentioning.
thanks
Welcome
hello
in problem B2: 1
Love your editorial really .. Go a head !! .. But Why dont you sometimes invite tourist 😅
Lol, someday hopefully
Can you explain that why are we doing last-=c1 ? here c1 will denote the number of times we can perform the ops on v1 such that it still remains less that v2. but i dont understand why do we need to subtract it.
update : undetstood the reason
it is because if we perform the last number of steps on v2 it will be lot bigger than v1 , since we need the minimum number of steps we remove the number of steps for which v1 < v2 ensuring , to ensure after performing the steps v2 gets to a minimum value that is greater than v1.
also i hope to be as good as you one day :)
Hello
In problem B1, I have the similar approach but I used unordered_map to store the count, it is giving wrong answer in pretest7, how to debug the error as the testcases are not shown?
Take Long long
In problem A, why can't we start filling from the first cell that is (1,1)?
will we consider it as a diagonal also? why do we start filling from the middle one?
to get max diagonals start from small to big , in this prob minimum was asked so go from big to small
@@munvut877 thank you🙏
32:15 won't b always be zero?
Hi,
There will be some money left after the first step (because we can pick limited numbers of flower type 1, at most p[i].second)
So, we greedily have to pick as many flower type i + 1 as possible and it won't be necessarily 0.
@@CPwithShayan oh yeah, completely forgot there were constraint on number too
For problem B2, what if i greedily buy flowers of type (i + 1) and then buy flowers of type (i) from the remaining. I was using this configuration and then trying to adjust the current solution to the optimal solution but was not able to do it. Can someone help ?
you need to buy more than 1 type(i) flower for every type(i+1) flower u sell in order to improve the answer (using while loop). Cos if you sell 1 type(i+1) and buy 1 type(i) your answer gets worse by 1.
Take the case where petals, quantity={(7,2),(6,3)} and maxmoney=18 or 13 here we have to use sliding window technique. Which worked with few minor adjustments for B1 but for B2 this will result in TLE for sure, so I gave up this approach 😂
But I think we can do it that way also we can make some changes in shayan's code
thank you
You're welcome
Hey Shayan,
I really want to know why my code doesn’t work in problem B1. It seems exactly like your solution.
I sent you my solution on LinkedIn.
Hi,
Have you checked the test case that you got a WA on?
@@CPwithShayan WA on test 23