Codeforces Round 961 (Div 2) - Official Solution Discussion

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ก.ย. 2024

ความคิดเห็น • 55

  • @shahainmanujith2109
    @shahainmanujith2109 หลายเดือนก่อน +3

    Problem C was insane! Thank you for making it easy!

  • @ShubhamKumar-k6q
    @ShubhamKumar-k6q หลายเดือนก่อน +3

    Damnnn great content, best guys for post contest tutorials!!
    btw you like a kashmiri indian.

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน +1

      Lol
      Thank you!

  • @DonavernAng
    @DonavernAng หลายเดือนก่อน +2

    Loved the content, subbed

  • @saeedjalali7339
    @saeedjalali7339 หลายเดือนก่อน +5

    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  หลายเดือนก่อน +4

      😂😂 I tried to act like nothing special has happened

    • @tylerd5924
      @tylerd5924 หลายเดือนก่อน

      Everyone knows that much nothing awkward ig 😂

    • @khinljk
      @khinljk หลายเดือนก่อน +1

      I also thought does Shayan know 'Amharic' since 'Salam' means hello, hi ... in 'amharic'.

  • @tusharsingh9346
    @tusharsingh9346 หลายเดือนก่อน +1

    thank you for the editorial !

  • @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 หลายเดือนก่อน

      I am also going through this stage : (. Hopefully I'll become CM within a year with a lot of practice

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน

      Hi,
      Thank you!
      I will definitely cover it in the upcoming livestreams. I will have some dedicated livestreams for discussing such things.

  • @aryanagrawal9103
    @aryanagrawal9103 หลายเดือนก่อน +1

    thanks a lot! also, would be even better if u take some test cases as examples for explanation

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน +1

      Sure.
      Will do in the next ones

  • @Jazzimus
    @Jazzimus หลายเดือนก่อน +1

    great explanation!

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน +2

      Glad you liked it

  • @sujalsuri1109
    @sujalsuri1109 หลายเดือนก่อน +1

    Thanks for the video editorial

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน

      Thank you for the support!

  • @user-xg8kc2cs2p
    @user-xg8kc2cs2p หลายเดือนก่อน

    Loved the explanation, great going Shayan. Btw you look Indian but your accent is of the states.
    👏👏

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน

      Do I really? Lol
      Never noticed it

  • @Dontpushyour_luck
    @Dontpushyour_luck หลายเดือนก่อน +1

    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 หลายเดือนก่อน

    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?

  • @jugnugupta6839
    @jugnugupta6839 หลายเดือนก่อน

    Awesome explanations 🎉

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน

      Glad you liked it

  • @darpanlunagariya9021
    @darpanlunagariya9021 หลายเดือนก่อน +1

    If it possible, you should turn off background possible, it is very distracting!

    • @darpanlunagariya9021
      @darpanlunagariya9021 หลายเดือนก่อน

      background animation*

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน

      I see. I will put a vote in the Telegram channel about it to ask what to do. Thanks for mentioning.

  • @italk-gj5kk
    @italk-gj5kk หลายเดือนก่อน +1

    thanks

  • @vudo1013
    @vudo1013 หลายเดือนก่อน

    hello
    in problem B2: 1

  • @mosalah151
    @mosalah151 หลายเดือนก่อน

    Love your editorial really .. Go a head !! .. But Why dont you sometimes invite tourist 😅

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน

      Lol, someday hopefully

  • @harshbam603
    @harshbam603 หลายเดือนก่อน

    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 หลายเดือนก่อน

      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 หลายเดือนก่อน

      also i hope to be as good as you one day :)

  • @grandhisrinikhil6259
    @grandhisrinikhil6259 หลายเดือนก่อน

    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?

  • @sahej1766
    @sahej1766 หลายเดือนก่อน

    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 หลายเดือนก่อน +1

      to get max diagonals start from small to big , in this prob minimum was asked so go from big to small

    • @sahej1766
      @sahej1766 หลายเดือนก่อน

      @@munvut877 thank you🙏

  • @prakhargupta1688
    @prakhargupta1688 หลายเดือนก่อน +2

    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 หลายเดือนก่อน +2

      @@CPwithShayan oh yeah, completely forgot there were constraint on number too

  • @sahajgupta5364
    @sahajgupta5364 หลายเดือนก่อน

    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 หลายเดือนก่อน

      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 หลายเดือนก่อน

      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 หลายเดือนก่อน

      But I think we can do it that way also we can make some changes in shayan's code

  • @youtubeunbanmepls
    @youtubeunbanmepls หลายเดือนก่อน +2

    thank you

    • @CPwithShayan
      @CPwithShayan  หลายเดือนก่อน +1

      You're welcome

  • @mezenabyd
    @mezenabyd หลายเดือนก่อน

    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  หลายเดือนก่อน

      Hi,
      Have you checked the test case that you got a WA on?

    • @mezenabyd
      @mezenabyd หลายเดือนก่อน

      @@CPwithShayan WA on test 23