Codeforces Round 961 (Div 2) - Official Solution Discussion

  Рет қаралды 12,312

Competitive Programming with Shayan

Competitive Programming with Shayan

Күн бұрын

Пікірлер: 55
@shahainmanujith2109
@shahainmanujith2109 3 ай бұрын
Problem C was insane! Thank you for making it easy!
@CPwithShayan
@CPwithShayan 3 ай бұрын
Most welcome
@ShubhamKumar-k6q
@ShubhamKumar-k6q 3 ай бұрын
Damnnn great content, best guys for post contest tutorials!! btw you like a kashmiri indian.
@CPwithShayan
@CPwithShayan 3 ай бұрын
Lol Thank you!
@DonavernAng
@DonavernAng 3 ай бұрын
Loved the content, subbed
@CPwithShayan
@CPwithShayan 3 ай бұрын
Thanks man!
@tusharsingh9346
@tusharsingh9346 3 ай бұрын
thank you for the editorial !
@CPwithShayan
@CPwithShayan 3 ай бұрын
Most welcome!
@NG-ot4nb
@NG-ot4nb 3 ай бұрын
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?
@rlm3227
@rlm3227 3 ай бұрын
I am also going through this stage : (. Hopefully I'll become CM within a year with a lot of practice
@CPwithShayan
@CPwithShayan 3 ай бұрын
Hi, Thank you! I will definitely cover it in the upcoming livestreams. I will have some dedicated livestreams for discussing such things.
@Jazzimus
@Jazzimus 3 ай бұрын
great explanation!
@CPwithShayan
@CPwithShayan 3 ай бұрын
Glad you liked it
@aryanagrawal9103
@aryanagrawal9103 3 ай бұрын
thanks a lot! also, would be even better if u take some test cases as examples for explanation
@CPwithShayan
@CPwithShayan 3 ай бұрын
Sure. Will do in the next ones
@Harsh-w1i
@Harsh-w1i 3 ай бұрын
Loved the explanation, great going Shayan. Btw you look Indian but your accent is of the states. 👏👏
@CPwithShayan
@CPwithShayan 3 ай бұрын
Do I really? Lol Never noticed it
@sujalsuri1109
@sujalsuri1109 3 ай бұрын
Thanks for the video editorial
@CPwithShayan
@CPwithShayan 3 ай бұрын
Thank you for the support!
@jugnugupta6839
@jugnugupta6839 3 ай бұрын
Awesome explanations 🎉
@CPwithShayan
@CPwithShayan 3 ай бұрын
Glad you liked it
@saeedjalali7339
@saeedjalali7339 3 ай бұрын
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.😂
@CPwithShayan
@CPwithShayan 3 ай бұрын
😂😂 I tried to act like nothing special has happened
@tylerd5924
@tylerd5924 3 ай бұрын
Everyone knows that much nothing awkward ig 😂
@khinljk
@khinljk 3 ай бұрын
I also thought does Shayan know 'Amharic' since 'Salam' means hello, hi ... in 'amharic'.
@Dontpushyour_luck
@Dontpushyour_luck 3 ай бұрын
So, the inference I got from problem C is this : if a^(2) > b^(1) and a b^(2x) and a^(2x)
@Mohammad-w5l5j
@Mohammad-w5l5j 3 ай бұрын
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?
@italk-gj5kk
@italk-gj5kk 3 ай бұрын
thanks
@CPwithShayan
@CPwithShayan 3 ай бұрын
Welcome
@vudo1013
@vudo1013 2 ай бұрын
hello in problem B2: 1
@harshbam603
@harshbam603 3 ай бұрын
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.
@harshbam603
@harshbam603 3 ай бұрын
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.
@harshbam603
@harshbam603 3 ай бұрын
also i hope to be as good as you one day :)
@grandhisrinikhil6259
@grandhisrinikhil6259 3 ай бұрын
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?
@divyanshushekharjha4639
@divyanshushekharjha4639 3 ай бұрын
Take Long long
@sahej1766
@sahej1766 3 ай бұрын
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?
@munvut877
@munvut877 3 ай бұрын
to get max diagonals start from small to big , in this prob minimum was asked so go from big to small
@sahej1766
@sahej1766 3 ай бұрын
@@munvut877 thank you🙏
@mosalah151
@mosalah151 3 ай бұрын
Love your editorial really .. Go a head !! .. But Why dont you sometimes invite tourist 😅
@CPwithShayan
@CPwithShayan 3 ай бұрын
Lol, someday hopefully
@youtubeunbanmepls
@youtubeunbanmepls 3 ай бұрын
thank you
@CPwithShayan
@CPwithShayan 3 ай бұрын
You're welcome
@darpanlunagariya9021
@darpanlunagariya9021 3 ай бұрын
If it possible, you should turn off background possible, it is very distracting!
@darpanlunagariya9021
@darpanlunagariya9021 3 ай бұрын
background animation*
@CPwithShayan
@CPwithShayan 3 ай бұрын
I see. I will put a vote in the Telegram channel about it to ask what to do. Thanks for mentioning.
@sahajgupta5364
@sahajgupta5364 3 ай бұрын
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 ?
@jiakai7254
@jiakai7254 3 ай бұрын
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.
@tylerd5924
@tylerd5924 3 ай бұрын
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 😂
@tylerd5924
@tylerd5924 3 ай бұрын
But I think we can do it that way also we can make some changes in shayan's code
@prakhargupta1688
@prakhargupta1688 3 ай бұрын
32:15 won't b always be zero?
@CPwithShayan
@CPwithShayan 3 ай бұрын
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.
@prakhargupta1688
@prakhargupta1688 3 ай бұрын
@@CPwithShayan oh yeah, completely forgot there were constraint on number too
@mezenabyd
@mezenabyd 3 ай бұрын
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.
@CPwithShayan
@CPwithShayan 3 ай бұрын
Hi, Have you checked the test case that you got a WA on?
@mezenabyd
@mezenabyd 3 ай бұрын
@@CPwithShayan WA on test 23
Codeforces Round 667 (Div. 3) Stream + All Solutions (A-F) (+ extra)
3:55:56
LeetCode Two Sum II Problem Explained and Solved!
4:01
Rohith Manoharan
Рет қаралды 22
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 2,7 МЛН
UFC 308 : Уиттакер VS Чимаев
01:54
Setanta Sports UFC
Рет қаралды 794 М.
Я сделала самое маленькое в мире мороженое!
00:43
Number Theory Problem Solving - Topic Stream
1:50:52
Competitive Programming with Shayan
Рет қаралды 2 М.
Codeforces Global Round 27 - Programming Contest Solution Discussion
2:16:52
Competitive Programming with Shayan
Рет қаралды 3,5 М.
[Special Livestream next to New York] Codeforces Pinely Round 4 (Div 1 + 2) - Solution Discussion
1:01:07
STOP Forgetting What You Study With These PROVEN TECHNIQUES
4:59
Rise Above Reality
Рет қаралды 7 М.
5 secrets to LEARNING FASTER (backed by science)
5:54
Python Programmer
Рет қаралды 22 М.
Viral Video of a Man's Crazy Job Interview
16:02
Darryl Vega TV
Рет қаралды 1,5 МЛН
Winning Codeforces Round #628 (Div. 2) + Facecam
1:08:33
William Lin (tmwilliamlin168)
Рет қаралды 393 М.
Codeforces Round 979 (Div 2) - Programming Contest Solution Discussion
2:11:52
Competitive Programming with Shayan
Рет қаралды 6 М.
Codeforces Round #856 (Div. 2) C, D, E - A Detailed Tutorial
46:32
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 2,7 МЛН