When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

iamnick's blog

By iamnick, 22 months ago, In English

Recently I came across a good example in which we can see the power of dp so I thought why not make a video about it.

In the video, I tried to explain why we need dp by taking a simple example of hens and egg. Later on I calculated the nth element of the Fibonacci series using memorization.

I tried to keep this beginner's friendly. Hope you like it :)

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
22 months ago, # |
  Vote: I like it +8 Vote: I do not like it

fibonacci can be done faster

there's also a closed form (Binet's Formula)

»
22 months ago, # |
  Vote: I like it +2 Vote: I do not like it

Se da un sir de cifre separate prin operatori '*' sau '+'. Avand voie sa faci maxim K interschimbari intre operatori, aflati valoarea maxima a expresiei.

  • »
    »
    22 months ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    Am o problema mai calitativa.

    Se da un sir de cifre separate prin operatori '*', '+', '-', '/', '^', '&', 'XOR', '!' '|'. Avand voie sa faci maxim K interschimbari intre operatori, aflati valoarea maxima a expresiei.

    Marinush

  • »
    »
    22 months ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    [Deleted]

    • »
      »
      »
      22 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      That's not the same problem.

    • »
      »
      »
      22 months ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      You are wrong, it is Romanian TST Junior problem. (Which it in of itself means it is cleeaarly not reappearing on some lost cses page)

      Also I forgot: number of digits is <= 1000 and number of '*' is <= 18.