I studied an algorithm (?) Called dynamic programming. ![3F2E6842-BA7D-42BB-AFD2-7E162E5BCA6E.jpeg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/632018/a57bf35f-7043-8b92-e75a-816ef6aecfa4 .jpeg)
First of all, the simpler →![ADA10812-D03C-4049-9B32-BF00B2EC3AB3.jpeg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/632018/cd479474-568d -2582-65c5-474df8491fca.jpeg)
And it's a waste →![825840D7-AE0F-4699-B1CB-6AC67C487421.jpeg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/632018/7720321f-064d- 68d4-9986-7f1f2b42e561.jpeg)
The first one is the DP you get, and the second one is the DP you give out. To put it simply, dynamic programming is a method of comparing the weights one by one in order and filling in all the patterns! Well, it's a full search, so the order is quite large, but I think it's big if you don't know how to do it! !! I will do my best to continue! !!
Recommended Posts