2010-04-22から1日間の記事一覧
Gifts贈り物・王・王妃の間の最短距離を予め求めておく。位置と持っている贈り物を状態として、動的計画法。ある地点xで贈り物を拾わない場合は、xを通らなかったとみなせる。 #include <string> #include <vector> using namespace std; class Gifts { int countbit( int n </vector></string>…
Gifts贈り物・王・王妃の間の最短距離を予め求めておく。位置と持っている贈り物を状態として、動的計画法。ある地点xで贈り物を拾わない場合は、xを通らなかったとみなせる。 #include <string> #include <vector> using namespace std; class Gifts { int countbit( int n </vector></string>…