._JO_.'s blog

By ._JO_., history, 10 months ago, In English

Hello Guys

For these types of problems under which tag are they and how to practice it?

https://codeforces.com/contest/1453/problem/B

and if any one has a link for some problems to master it, I'll be grateful

thanks in advance

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
10 months ago, # |
Rev. 2   Vote: I like it +1 Vote: I do not like it

this my solution for this problem how to think in that? first think in pre-calculation then how to update this calculation so it take minimum time to get the answer for the every postion. in this problem we easily could solve it in o(n^2) by ignoring every num once and calculate the ans and take minimum but if you observe you only affect on 3 segment so why every time recalculate the whole array so you think to memorize answer for the unaffected part so i calculate the answer for whole array without using the special update of element then brute force on every index and take best it sort of dp.

type of problems to pratice in order to improve on this style: implementation and constructive algorithm

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

    thanks a lot; could you tell me your practice style?

    what are the problems you solve? which sheet, and if you use one, please share it with me

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

      On this topics(implementation,constructive algorithm) I solve generally from problem set and from Dr.mostafa saad sheet this