cment_mixer's blog

By cment_mixer, history, 6 weeks 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.com/contest/1395/problem/C

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

»
6 weeks 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

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

My submission. If you understand it then kudo and if not, I will help.