ratinggobrrr's blog

By ratinggobrrr, history, 4 years ago, In English

Can anyone share dp solution of this problem if it's possible to do so this way. It would be a great help.

Thanks in advance.

https://codeforces.me/contest/1395/problem/C

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

| Write comment?
»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

there is no need to use dp just iterate over all mask and check whethere you can get such mask or not and choose smalest 89698640 dont write dp when you not need it.dont make problem harder