2016年2月10日

【HDOJ】4328 Cut the cake

摘要: 将原问题转化为求完全由1组成的最大子矩阵。挺经典的通过dp将n^3转化为n^2。 1 /* 4328 */ 2 #include <iostream> 3 #include <sstream> 4 #include <string> 5 #include <map> 6 #include <queu 阅读全文

posted @ 2016-02-10 22:18 Bombe 阅读(191) 评论(0) 推荐(0) 编辑

【HDOJ】4322 Candy

摘要: 状态DP显然可以解,发现T了,不知道优化后能不能过。然后发现费用流可以解。trick是对need拆解成need/K, need%K两种情况讨论。 1 /* 4312 */ 2 #include <iostream> 3 #include <sstream> 4 #include <string> 5 阅读全文

posted @ 2016-02-10 16:17 Bombe 阅读(218) 评论(0) 推荐(0) 编辑

导航