2012-06-29から1日間の記事一覧
PillarsDivTwo動的計画法。それぞれの塔のそれぞれの位置にロープを付ける場合の、そこまでのロープの最大の長さを覚えておく。 #include <vector> #include <cmath> #include <algorithm> using namespace std; class PillarsDivTwo{public: double maximalLength( vector <int> height, in</int></algorithm></cmath></vector>…