ygd161837jn2n313's blog

By ygd161837jn2n313, history, 6 weeks ago, In English
 
 
 
 
  • Vote: I like it
  • -9
  • Vote: I do not like it

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

Not really a $$$dp$$$ approach , but you can keep $$$dp_i$$$ as being the minimal number of steps to reach $$$i$$$. We can use dijkstra / 0-1 bfs to calculate this $$$dp$$$.