摘要: Max Sum Plus Plus "HDOJ 1024" 动态转移方程:dp[i][j]=max(dp[i][j 1]+a[j],max(dp[i 1][k])+a[j]) (0 include include include include using namespace std; const 阅读全文
posted @ 2019-08-06 21:02 Garrett_Wale 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Traving "HDOJ 3001" 这题考察的是状态压缩dp和tsp问题的改编 需要和传统tsp问题区分的事,这题每个点最多可以经过两次故状态有3种:0,1,2 这里可以模仿tsp问题的二进制压缩方法,进行压缩最后再dp处理: P191 白书tsp问题求解 include include inc 阅读全文
posted @ 2019-08-06 11:43 Garrett_Wale 阅读(142) 评论(0) 推荐(0) 编辑