摘要: 18/05/22 2-15-3 P1064 金明的预算方案 最开始我误以为是树形背包,但想了一下以后发现每个节点的孩子最多有2个,所以可以直接暴力,相当于01背包的扩展讨论。写了一发没过,看了看题解,没什么不一样的,不想改了(假装AC)。 2-19-1 P1601 A+B Problem(高精) j 阅读全文
posted @ 2018-04-23 19:18 啦啦啦天啦噜 阅读(298) 评论(0) 推荐(0)
摘要: #include #include #include #include using namespace std; //定义比较结构 struct cmp1{ bool operator ()(int &a,int &b){ return a>b;//最小值优先 } }; struct cmp2{ bool operator ()(int &a,int ... 阅读全文
posted @ 2018-04-23 16:19 啦啦啦天啦噜 阅读(270) 评论(0) 推荐(0)