摘要: 甚至都不是树形背包= = 把每条线抠出来,这一条线就是个链的依赖关系,随便背包一下 阅读全文
posted @ 2018-10-21 22:21 菜狗xzz 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 把坐标按照(x+y)%2染色可以发现这是个二分图 二分图最大独立集=点数 最大匹配 于是就是个算匹配的傻逼题了 cpp // luogu judger enable o2 include define il inline define vd void typedef long long ll; il 阅读全文
posted @ 2018-10-21 22:19 菜狗xzz 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 有个结论就是把坐标$(x,y)$变形成$((x+y)/2,(x y)/2)$,切比雪夫距离就变成了曼哈顿距离。 所以变换一下坐标直接统计答案即可。 cpp // luogu judger enable o2 include define il inline define vd void typede 阅读全文
posted @ 2018-10-21 22:17 菜狗xzz 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 同tjoi2010 打扫房间,每个点入度,出度都为1,可以向相邻4个点连边,但只有原来存在的边费用为0。 阅读全文
posted @ 2018-10-21 19:59 菜狗xzz 阅读(147) 评论(0) 推荐(1) 编辑