http://codevs.cn/problem/4927/ 比较有价值 ...
分类:
其他好文 时间:
2018-02-11 19:53:09
阅读次数:
143
【题解】 因为只询问一个点,所以记录地毯信息,倒着找第一个符合条件的地毯就是在最上面的。 ...
分类:
其他好文 时间:
2018-02-11 18:12:57
阅读次数:
141
s向仓库i连ins(s,i,a[i],0),商店向t连ins(i+m,t,b[i],0),商店和仓库之间连ins(i,j+m,inf,c[i][j])。建两次图分别跑最小费用最大流和最大费用最大流即可。 cpp include include include include using namesp ...
分类:
其他好文 时间:
2018-02-11 14:26:27
阅读次数:
119
和火星那个有点像,但是这个价值直接在路径上,不用拆点,对于每条价值为w的边(i,j),连接(i,j,1,w)(i,j,inf,0),表示价值只能取一次,然后连接源点和所有出发点(s,i,k,0),所有终点和t(i,t,r,0),然后跑最大费用最大流即可。 cpp include include in ...
分类:
其他好文 时间:
2018-02-11 10:40:00
阅读次数:
180
链接 "bzoj 1433: [ZJOI2009]假期的宿舍" 题解 构建二分图,每个人需要住校的人连认识的人的空床和自己的床, 匈牙利算法二分图匹配 注意清空上组数据ORZ 代码 c++ include include include inline int read() { int x=0; ch ...
分类:
其他好文 时间:
2018-02-10 21:57:23
阅读次数:
202
推荐学习资料: http://www.cnblogs.com/Ash-ly/p/5452580.html http://ylroki.blog.163.com/blog/static/162978871201032775322518/ https://wenku.baidu.com/view/38d ...
分类:
其他好文 时间:
2018-02-10 20:09:52
阅读次数:
247
1017: [JSOI2008]魔兽地图DotR Description DotR (Defense of the Robots) Allstars是一个风靡全球的魔兽地图,他的规则简单与同样流行的地图DotA (Defense of the Ancients) Allstars。DotR里面的英雄 ...
分类:
Web程序 时间:
2018-02-10 12:51:35
阅读次数:
259
题目链接 "luogu P1446 [HNOI2008]Cards" 题解 题意就是求染色方案 等价类 洗牌方式构成成了一个置换群 然而,染色数限制不能用polay定理直接求解 考虑burnside引理 对于一个置换群其等价类的个数为置换中不动点的平均数 先暴力求出置换中的轮换,然后01背包DP求出 ...
分类:
其他好文 时间:
2018-02-10 00:00:14
阅读次数:
184
A children’s board game consists of a square array of dots that contains lines connecting some of the pairs of adjacent dots. One part of the game req ...
分类:
其他好文 时间:
2018-02-09 15:23:36
阅读次数:
161