Codeforces Edu Round 112 || FaceCam + Commentary + Screencast || A, B, C, D, E

Поділитися
Вставка
  • Опубліковано 29 жов 2024

КОМЕНТАРІ • 85

  • @PriyanshAgarwal
    @PriyanshAgarwal  3 роки тому +30

    Solution to Problem A:
    - Trivial Cas: N = 7.
    Claim: we can represent N = a * 6 + b * 8 + c * 10
    Proof: N = 2K. so, it is the same as saying 2K = a * 6 + b * 8 + c * 10 -> K = a * 3 + b * 4 + c * 5
    N >= 7 so K >= 7 / 2 = 3.
    Now, we need to prove that K (>= 3) can be represented as a * 3 + b * 4 + c * 5.
    Observation: 4 = 1 mod 3, 5 = 2 mod 3.
    It is obvious that if K can be of the following types: (0 mod 3, 1 mod 3, 2 mod 3). Each of these cases can be achieved by picking up only 3s and picking up a 5 if k = 2 mod 3 and picking up a 4 when k = 1 mod 3.
    Answer = (N) * (2.5) because each slice is now of the same value.
    - Case 2: N = odd and N >= 7.
    Clearly, for the odd case, we cannot represent N as a * 6 + b * 8 + c * 10 as LHS is odd and RHS is even.
    So, we definitely need to bake more slices than required. Thus, we can just add 1 to N and get the same situation as Case 1.
    Hence answer = (N + 1) * (2.5)

    • @tanned_cosines_
      @tanned_cosines_ 3 роки тому

      Thanks bhau,
      ye waala samajne mein thoda time laga hamko
      i UwU ur skills 😁🙏

    • @108_adityakumar6
      @108_adityakumar6 3 роки тому

      Nice explanation 👍🏻 Thanks Bhaiya

    • @gammastrain5289
      @gammastrain5289 3 роки тому

      Damn this was great, in contest I just put inequality in equality and it worked lol..

    • @AbjSir
      @AbjSir 11 місяців тому

      Thanks

  • @testcase8947
    @testcase8947 3 роки тому +24

    Pretty difficult contest to be honest.. Going to loose specialist today.. Lol

  • @warlock523
    @warlock523 3 роки тому +9

    Priyansh you did good, failing and then correcting the code 💯💯

  • @gabbar1867
    @gabbar1867 3 роки тому +4

    Getting goosebump while seeing you typing this makes me desperate to learn CP😎

  • @shadabkouser2446
    @shadabkouser2446 3 роки тому +15

    Master...soon..bro your "show me your profile" video really cleared most of the doubts....can u please make a video on your ide hacks,like the beginning..and the end part of your code...and some tips like keeping implementation code handy or sumthng..?....

    • @vaibhaves
      @vaibhaves 3 роки тому +7

      They are pretty much useless. Just focus on logic building. Yeah sure it saves you 5 minutes. But don't worry about it too much. I find such comments in every video. No offence

    • @shadabkouser2446
      @shadabkouser2446 3 роки тому

      @@vaibhaves thenks...but iam not specific for ide..but wats that in the beginning and end..?

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +9

      You mean that template?
      I can do a short video explaining my template some day.

    • @shadabkouser2446
      @shadabkouser2446 3 роки тому

      @@PriyanshAgarwal ya yaa. Sure..👍

  • @rajneeshpatel8893
    @rajneeshpatel8893 3 роки тому +2

    Thanks bro, by watching You and your thought process during contest help me in great improvement.

  • @the_shridhar
    @the_shridhar 3 роки тому

    You are just so intelligent. Hats off and salute!!

  • @jdragon8184
    @jdragon8184 3 роки тому +1

    I proud of you solving E , I need more practice before I can do that ,

  • @apoorvmehra121
    @apoorvmehra121 3 роки тому +6

    My rating is 1107. I practice problems of rating 1300 (+200) then also I am not improving. I could only solve A problem in div2 contests.. Can you suggest me what to do?

    • @HarshitSharma-cb7dx
      @HarshitSharma-cb7dx 3 роки тому +4

      Just go and solve some precious tests.. approx 7-8 and learn the concept used there in ABC and D

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +4

      Try out some virtual contests. Maybe you are not performing that well in contests.

  • @SanjibKumarGope
    @SanjibKumarGope 3 роки тому +4

    bro please explain logic of A. also where did you learned this concept?? is it GCD concept??

    • @AkashRaj-ib6wz
      @AkashRaj-ib6wz 3 роки тому +1

      Its intuition, only practice might teach this

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +7

      Problem A:
      - Trivial Cas: N = 7.
      Claim: we can represent N = a * 6 + b * 8 + c * 10
      Proof: N = 2K. so, it is the same as saying 2K = a * 6 + b * 8 + c * 10 -> K = a * 3 + b * 4 + c * 5
      N >= 7 so K >= 7 / 2 = 3.
      Now, we need to prove that K (>= 3) can be represented as a * 3 + b * 4 + c * 5.
      Observation: 4 = 1 mod 3, 5 = 2 mod 3.
      It is obvious that if K can be of following types: (0 mod 3, 1 mod 3, 2 mod 3). Each of these cases can be achieved by picking up only 3s and picking up a 5 if k = 2 mod 3 and picking up a 4 when k = 1 mod 3.
      Answer = (N) * (2.5) because each slice is now of same value.
      - Case 2: N = odd and N >= 7.
      Clearly, for odd case we cannot make represent N as a * 6 + b * 8 + c * 10 as LHS is odd and RHS is even.
      So, we definitely need to bake more slices than required. Thus, we can just add 1 to N and get the same situation as Case 1.
      Hence answer = (N + 1) * (2.5)

  • @sparks8754
    @sparks8754 3 роки тому +4

    Bro i am starting cp now, i know a intermediate level of dsa. I start giving contest on cf last week and till now i am not able to solve even problem 'A' what should i do please help

    • @orzAR26
      @orzAR26 3 роки тому +7

      A-mostly doesn't need Algo knowledge,
      Knowing particular code language and spme logics are enough to do A[div.2 and div.3]
      So don't worry choose the 800 tag to 1000 tag Problems and start solving gradually u can solve A easily!!!!!...

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +9

      Did you just say 1 week?
      Man if you look at my starting phase in CP you would laugh. I used to take days to fix runtime errors in my code 😂. I used to solve 0 problems in so many contests on CF and CC.
      Happens with everyone. Keep pushing.

  • @soumikdutta7867
    @soumikdutta7867 3 роки тому +18

    I solve at least A problem in every contest... but today i'm not able to solve any problem :-(

    • @as4928
      @as4928 3 роки тому

      Same

    • @rigvedsingh5013
      @rigvedsingh5013 3 роки тому

      @@as4928 same i am very depreesed right now

    • @trevorPhillips284
      @trevorPhillips284 3 роки тому +1

      I thought i was alone but yeah pretty disappointed here as well.

    • @rohandeshmukh3989
      @rohandeshmukh3989 3 роки тому

      Same bhai I also tried very hard but didn't able to solve a

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +12

      I think today's was not so easy as a normal A. It required a concept of linear equations which is not at all trivial if you don't know about ut already. Don't feel sad. There are always contests where you don't perform upto your level. The idea is to just learn those concepts that you don't know.

  • @random_memes009
    @random_memes009 3 роки тому +2

    Hey,priyansh I am in 3 year can I start cp if haven't started yet.I have basic dsa but haven't done development?how much time should I devote?

    • @theprnvanand
      @theprnvanand Рік тому

      hey.. what did you do? and what're you doing rn?

  • @utkarshsharma5202
    @utkarshsharma5202 3 роки тому +1

    In some videos esp. profile review and q & a, they are talking about some practicing from "SHEET". what was that?
    Did you provide some sheet for cp? Please reply

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +1

      Ohh no no. There is this very famous CP sheet called Mustafa Saad' Jr Training Sheet. You can find it in CF blogs.

  • @shriramr8695
    @shriramr8695 3 роки тому +3

    One request from People side Please do solution discussion of contest instead of facecam +Screencast or both if you wish.Because solution discussion will take less time only nearly 30 to 40 mins like you did for one contest.Why i am asking is because for example I didn't understand anything after seeing question A on screencast but when I saw your Pinned comment I fully understood.So it is easy to understand from solution discussion than screencast and moreover you can do your contest freely without facecam etc.So this is my humble request.Pls

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +1

      I get that solution discussion is important but these screencasts are not for explaining how a problem is to be solved. It is more like a gaming stream. Also, I mostly do post-contest discussions after the contests so if you are looking for solutions specifically, you can check them out.

    • @amandixit3555
      @amandixit3555 3 роки тому

      @@PriyanshAgarwal yes , i think a gaming stream would be much more entertaining , if that's the only reason you are doing screen cast , otherwise your post contest discussion are lit , try doing that only , because ultimately most of the folks watch screen cast just to know how to approach the problem they were not able to solve during the contest .

  • @srinjoyray6619
    @srinjoyray6619 3 роки тому +1

    Plz also explain the solutions after finishing the contest

  • @anshshah4927
    @anshshah4927 3 роки тому +7

    Codeforces Making A difficult and B even more difficult than standard level wth happening there? (Oh I see now because of increased cheating I think)

    • @Mr_Cat_11
      @Mr_Cat_11 3 роки тому +3

      But its bad for beginners like me

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +5

      Honestly I felt that too. Today's A was not so trivial. Also, B gave me a nightmare when I read it for the first time 😂

  • @avert_
    @avert_ 3 роки тому +3

    B took me 10 mins compared to 1 hour in A lol . Weird.

  • @108_adityakumar6
    @108_adityakumar6 3 роки тому +2

    I solved A at 10:10.It was a bad contest for me.

  • @kaal_bhairav_24
    @kaal_bhairav_24 3 роки тому

    which keyboard shortcut do you use to format the whole code?

  • @HarshitSharma-cb7dx
    @HarshitSharma-cb7dx 3 роки тому +2

    Bhai ek video mai Bloch chain ka pura roadmap bata do and usko acche se krne k course..

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +1

      Sorry, I have no idea about block chain.

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому

      I would have been happier if I got under 100 after doing that E problem. I am not sure how so many people were able to do it... it was definitely tough.

  • @suvankarbanerjee6048
    @suvankarbanerjee6048 3 роки тому +1

    why (n/2)*5 is the ans wer for even ididnt get it

  • @SumitKumar-fn3gj
    @SumitKumar-fn3gj 3 роки тому

    You are a genius. I will never reach your level.

  • @rockingbeast3651
    @rockingbeast3651 3 роки тому +1

    A. Bahiya what will be your thinking if 1slice value differs in 3 cases like(2.5, 3, 4)

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +1

      Lol, then it becomes a DP problem I guess provided the constraints on N are small... something like 1e6.

  • @jamesmacmillan2673
    @jamesmacmillan2673 3 роки тому +2

    Out of curiosity, wanted to ask that whether you have done any problem similar to D before ? since you got the idea very fast

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому

      None that I remember of. It was pure intuition.

  • @Newbie3130
    @Newbie3130 3 роки тому +1

    Today master bro!!

  • @satishprajapati1684
    @satishprajapati1684 3 роки тому +3

    i think this will do for Master

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +1

      Ummm... I don't think so. The predictor shows +20 only 🥺

    • @orzAR26
      @orzAR26 3 роки тому +1

      @@PriyanshAgarwal bro Contest was on tougher side, so don't worry u will reach master ❤️❤️❤️

  • @anshsingh9739
    @anshsingh9739 3 роки тому +1

    post contest discussion with anyone ?

  • @sumanthhegde5148
    @sumanthhegde5148 3 роки тому +1

    Is it weird that I found B easier than all other problems.? A took more time than B for me lol.

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +1

      No, A was somehow not that trivial this time.

  • @harshtripathi2287
    @harshtripathi2287 3 роки тому

    How long you've been into CP bro??

  • @justworkfine321
    @justworkfine321 3 роки тому +3

    I think I can't hear you

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +1

      What timestamp?

    • @justworkfine321
      @justworkfine321 3 роки тому +2

      @@PriyanshAgarwal sorry now I am able to hear you

    • @orzAR26
      @orzAR26 3 роки тому +4

      @@justworkfine321WTF, did u keep ur volume at 0 🤣,loool

  • @vijayjoshi402
    @vijayjoshi402 3 роки тому +1

    bhaiya aap gaming karte hai ? agar haan to konsi game ?

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +7

      I don't 😂. Time ni milta IIIT Delhi mein CP karne ka bhi... Gaming is impossible

  • @sifathossain7410
    @sifathossain7410 3 роки тому +1

    Can you amplify your voice?

    • @PriyanshAgarwal
      @PriyanshAgarwal  3 роки тому +4

      Sure... I will continue to wear my earphones from next screencast

  • @theVSORIGINALs
    @theVSORIGINALs 3 роки тому +2

    what do u think what will C's rating i did it by only using three variables one for alice and two for bobs forward and backward sum

  • @parthkabra8880
    @parthkabra8880 3 роки тому

    bro i am waiting for codeforces round #736, please !

  • @vaibhaves
    @vaibhaves 3 роки тому +2

    No sound. F

  • @BEEMohdArbazAli
    @BEEMohdArbazAli 3 роки тому

    you are feeling happy yet no expression on the face....lol