Good Triples | Codeforces 1907E Solution | Codeforces Round 913 (Div. 3) | English

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • In this video, I walk through the solution to problem D from Codeforces Round 913 (Div. 3)
    Contest link: codeforces.com...
    Problem name: "good triples"
    My Submission:
    codeforces.com...
    I explain the thought process and logic behind the solution and show how to implement it in code. Don't forget to like and subscribe for more coding content!
    Something else: / sreejithcoast

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

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

    Please solve the Getting points problem of 3rd dec contest

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

      Sorry, unable to upload.

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

    Nice explanation.

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

    Thanks for such great explanation!

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

    Great Tutorial

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

    Nice, 🤗

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

    lets say the value of n is 54 and for the ab and c i am just taking c = 54 , how is this case satisfying your logic also why we taking one digit at a time . please help

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

      One digit at a time, because we don't need to carry over. I didn't get the question where u r mentioning 54.

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

      @@codingdynamo three numbers i call a, b and c and i assign 0, 0, 54 respectively , now i didnt get the part of carry here as i am takin c as whole 54 the number itself .
      how is that working

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

      @@pokerfaced8139
      We need to write like
      a = 0 0 0 - digsum - 0
      b = 0 0 0 - digsum - 0
      c = 0 5 4 - digsum - 9
      -------- -----
      0 5 4 - digsum - 9
      This is a valid sequence.
      Here there is no carry.So horizontally (after digsum) and vertically(before digsum, normal addition) you get the same number. When something like carry comes, we don't know where to keep that extra 1, horizantally there is no room for that 1 (we just add the digits, but we are forced to place that extra 1 somewhere, which is not allowed in any digsum). It comes only in vertical. So we are ignoring carry. Your example doesn't have any carry here. You can rewatch the video and try again from part 3:50 - 4:33. To understand where carry over has an issue.

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

      Just think like whenever a number has carry we ignore them because of the reason mentioned.

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

      @@codingdynamo thank you so much dude for a clear and precise explanation