Codeforces Round 960 (Div 2) - Official Solution Discussion (with Shayan)

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ต.ค. 2024

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

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

    congrats on 10K subscribers. Really hope your work get recognition what it deserves. I don't really see so many people streaming and discussing these problems in this very patient & calm way. I think your channel has become my primary source of explanation when I don't get the editorials(which most of the people don't, LOL).

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

      Thank you very much, man

  • @darkknight98-v
    @darkknight98-v 2 หลายเดือนก่อน +3

    love the subtle changes you are making to your setup shayan! and the solutions (esp. d) are elegant as always! looking forward to more series like 1500+ dp etc.

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

      Glad you like it!
      Sure, I will make more if you like those series.

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

    Your passsion to cp and dedication to teach and helping other is incredible

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

      Thank you bro

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

    Congrats for 10.5K and thanks buddy for wonderful explanation.

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

      Thanks a ton

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

    You explain really well and with much patience. Love the streams ❤
    Thank you for all the help.

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

      @@mayankkharb4164 Such a comment really does boost my energy to keep improving the content.
      I must thank you for your support ❤️

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

    Congrats for 10k subs :)

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

      Thank you ❤️

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

    Man, you have a superpower for explaining things!

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

      Haha! Thanks

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

    this contest went horrible for me ,B just messed up my brain .
    I hope the next one goes better.

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

      Oh, I wish you a better one next time.

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

      @@CPwithShayan Thank you so much

  • @Mohamed_Amine_Bennacef
    @Mohamed_Amine_Bennacef 13 วันที่ผ่านมา

    Great explanation shayan honestly you're the best out there

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

    Congrats on 10k subs dude!

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

      I have it because of your support. Thank you.

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

    Your dp solution for d is really elegant..

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

      I'm glad you liked it.

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

    The explaination for problem 2 was very clear. Thanks a lot ❤❤❤❤

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

      Glad to hear that

  • @Naman-n4b
    @Naman-n4b 2 หลายเดือนก่อน +1

    IN E question
    If total nodes are 3000 and root node 1 has 2999 children can we able to solve it within 160 queries.

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

    you helped me a lot, seriously, thank you very much

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

      Glad I could help!

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

    great explanations!! keep up the gr8 work

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

      Thanks, will do!

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

    keep up the good work

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

    Thank you for the editorial

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

    In B, instead of alternative -1 and 1, I kept the -1s together and then kept all other as 1, the no. of -1 and 1 after x and before y are the same in alternative and my approach but it was giving me wrong ans on pretest 2 at (5,2,1) :
    expected output: 1 1 -1 1 -1
    my output: 1 1 -1 -1 1
    on dry running , even my output satisfies the condition but still it gave me srong ans., can someone help me with this:
    #include
    using namespace std;

    int main()
    {
    int t;
    cin >> t;
    while (t--){
    float n,x,y;
    cin>>n>>x>>y;

    vector a(n,1);
    float f=(n-x)/2;
    int fi=ceil(f);
    for(int i=0;i

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

      I'd did the same thing before, I was able to figure why it fails but sadly after the contest.
      Consider this array below for n=10 , x=7, y=6 (this is what your code would return)
      1 1 -1 -1 -1 1 1 -1 -1 1. (I separate them for easily spotting x and y)
      Now why does it fail. It fails specifically for x, because the question says x should be the smallest possible with the max value, but in the array above that is not the case. We have a prefix sum at index two which has a greater sum that the prefix sum at index x.
      Now the reason this passed test 1 was because we were having only consecutive segments of positive 1s with length less than x-y+1 (the length of y to x segment) once it becomes greeter or equal to that, it fails.
      But alternating it, just like Shayan said would guarantee we have no other sum than 0 and -1 for the prefix and suffix.

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

      @@daveshub oh yeah even I noticed that smallest possible x line in the question after re reading question so many times

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

    just for the looks, it would be better if you keep the computer screen rectangle only or with lesser border radius

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

      @@rashidaziz2215 Thanks for the feedback

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

    Bro, you,'re the best

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

    Thank you sir.
    Very helpful!

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

      Glad to hear that

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

    Is this correct for D , Dp[i][1] minimum number of operation to color all cells white till i-1 th row including one 2x2 square which start at ith row

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

      I think you're gonna need to take the second 2*2 into consideration as well.

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

    excellent explanation

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

      Thanks ❤️

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

    You are the best

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

      Thanks! Means a lot to me

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

    great content sir

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

    I was so close to B but didn't pass, cos' i know that before y and after x, it should be 1, -1, 1, -1, and close to x and y it should be -1. But I didn't code properly and got two contiguous -1 before y and after x... I also have a idea with C but also not pass.... shame on me

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

      No problem, dude. You'll do better in the next round.

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

    great video

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

    The second was not that tough but I did'nt understand what the question was asking:(

  • @RANASATYARAJSINH-o7i
    @RANASATYARAJSINH-o7i 2 หลายเดือนก่อน

    Can you remove the background animation from now on? Its very distracting

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

      I see. I’ll put a vote in the Telegram channel to see what to do. Thanks for mentioning

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

    sir please continue dp 2000+ series

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

      Sure, I’ll do if I know people get benefit from it.

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

    Can you cover F from the same comment? I got A-E easily but F gave me a lot of trouble. Figured out the case with no type 2 queries (array value update) by building a binary tree of local maxes, but updates ruin the structure. The tutorial is poorly written and writes wrong inequalities.

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

    Went very bad 😔. Couldn't even crack C