![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
状压dp
君月.cpp
往上爬的程序猿
展开
-
UVA - 11825 (2020.4.26训练B题)
题意:给定n个电脑编号0~n-1,每个电脑能连接num个其他编号电脑,求一个最优划分,划分最多且每个划分都能覆盖全集电脑 状压dp,要用到枚举子集这个重要的东西,如下 其他的工作便是更新dp值,详见代码注释 AC代码 #include<iostream> #include<algorithm> #include<string.h> using namespac...原创 2020-05-07 15:52:59 · 120 阅读 · 0 评论 -
POJ - 3254 (2020.4.23训练B题)
Problem Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regre...原创 2020-05-06 18:11:47 · 289 阅读 · 0 评论