2-sat
_leon1999
qaq
展开
-
2sat专题解题报告
Bomb Game HDU - 3622 题目大意:给出了n对坐标,每一对坐标选出一个放置炸弹,炸弹的半径可以控制,但是不能有相交的情况。求最大半径。 解题思路:二分+2sat 二分半径,用2sat判断当前情况是否回出现矛盾。出现矛盾的情况即一个集合里的两个元素同时被选择。 构图:添加对称边. 枚举 #include<iostream> #include<c...原创 2019-03-11 12:07:34 · 102 阅读 · 0 评论 -
codeforce 436C The Door Problem
The Door Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Moriarty has trappednpeople inndistinct rooms in a hotel. So...原创 2019-07-30 14:42:08 · 83 阅读 · 0 评论