Google Code Jam 2021 Round 2: 34th place

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

КОМЕНТАРІ •

  • @crypto.master.ai.
    @crypto.master.ai. 3 роки тому +4

    Your videos are great!!

  • @akibmahmudrime2845
    @akibmahmudrime2845 3 роки тому +8

    Neal, can you please make a video about your CP setup?

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

    Hey, can you please share your bash script that runs and test solutions.

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

    what keyboard do you have?

  • @Gaurav-zh4pm
    @Gaurav-zh4pm 3 роки тому

    Setup video please

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

    Anyone can recommend me a video for having this kind of ide and code template setup pls?

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

      IDE is Sublime. and the code is c++ . Not sure of the template though.

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

      @@kashyapKbandi yup I know these, I was talking about how he does debug and also he has already written so many custom function even before starting. So I wish there would be video anywhere explaining writing important functions and type defs.

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

      @@aniketkumarpathak4630 i have the saem doubt,if u ever find please reply to this

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

      I don't know how he test and debug but there is a command line application called "cpbooster". We can download test cases, test and debug etc. Very nice tool. As I am using Neovim I can directly test and debug within NeoVIM

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

      @@aniketkumarpathak4630 you get this over time

  • @abc-by1kb
    @abc-by1kb 3 роки тому +4

    This is core algo from Gennady's problem 2.
    for (int i = 1; i < MAX; i++) {
    for (int j = 2 * i + 1; j < MAX; j += i) {
    dp[j] = max(dp[j], dp[i] + 1);
    }
    }
    Could you explain why it's j = 2 * i + 1 instead of j = 2 * i ?

    • @letscode-it881
      @letscode-it881 3 роки тому

      Because if you move down by one step , you have to add two to its left value

    • @abc-by1kb
      @abc-by1kb 3 роки тому

      @@letscode-it881 Your reply makes no sense. But nvm after an hour of thinking I figured it out. It's a very subtle dp transition. y = 1 + kx . Because a_(i+1) = k a_(i), k is integer, the terms after 1 must have a common divisor.

    • @letscode-it881
      @letscode-it881 3 роки тому

      @@abc-by1kb try to make a 2d matrix and do dry run. You will get to know my reply make sense or not

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

    what is the type of ur keyboard;

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

    Please share your templates with us.🙏🏼

  • @AvinashKumar-qi8ys
    @AvinashKumar-qi8ys 3 роки тому

    Awesome man !!!

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

    I should not say it. But change your dp😂
    It looks bad