摘要: Common Subsequence "POJ 1458" //最长公共子序列问题 include include include include include using namespace std; string a,b; int dp[1003][1003]; int main(){ whi 阅读全文
posted @ 2019-10-08 16:52 Garrett_Wale 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Jury Compromise "POJ 1015" 推荐几个较好的介绍和理解:https://blog.csdn.net/lyy289065406/article/details/6671105 https://blog.csdn.net/glqac/article/details/2268724 阅读全文
posted @ 2019-10-08 16:39 Garrett_Wale 阅读(134) 评论(0) 推荐(0) 编辑
摘要: FatMouse's Speed "HDOJ 1160" 注意输出长度的时候不是输出dp[n] include using namespace std; const int maxn=1003; const int INF=0X3F3F3F3F; int w[maxn];//weight int s 阅读全文
posted @ 2019-10-08 11:18 Garrett_Wale 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 最少拦截系统 "HDOJ 1257" 我做这题的思路就是采用暴力或者贪心。也就是每次循环选出从第一个未被选择的元素开始,依次把后面可以选择的元素作为一个系统。最后统计可以有多少个系统。 还有人的思路就是利用动态规划的思路,求解最长上升子序列,也就是反着题意来求。因为在这个最长上升子序列中,所有的元素 阅读全文
posted @ 2019-10-08 09:52 Garrett_Wale 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Tickets "HDOJ 1260" 阅读全文
posted @ 2019-10-08 09:15 Garrett_Wale 阅读(108) 评论(0) 推荐(0) 编辑