0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

動的計画法の勉強①

Posted at

動的計画法というアルゴリズム(?)を勉強しました。3F2E6842-BA7D-42BB-AFD2-7E162E5BCA6E.jpeg

まずは、簡単な方→ADA10812-D03C-4049-9B32-BF00B2EC3AB3.jpeg
48EEE6C8-EE6A-46DD-94F8-2417FE85F8F4.jpeg

そしてムズいほう→825840D7-AE0F-4699-B1CB-6AC67C487421.jpeg
BD03E4D9-B32C-4844-95F1-1E62391CE71A.jpeg

最初の方は貰うDP、後の方は配るDPで書きました。動的計画法は簡単に言うと、1つずつの重みを順番に比べていって全てのパターンを埋める、という方法ですね!まぁ全探索なのでオーダーなかなか大きいですが、やり方を知ってるのと知らないのでは大きいと思います!!続きも頑張ります!!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?