摘要: // luogu-judger-enable-o2 #include using namespace std; const int INF=0x3f3f3f3f; const int maxn=50004; int n,S,T,head[maxn],nxt[maxn],mark[maxn],dep[maxn],cnt=0,ans; struct node{ int to,next,w... 阅读全文
posted @ 2019-01-27 14:24 WiFiMonster 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 最小割,割实验表示不选这个实验,割器材表示选这个器材(很多题解都没说) 答案=Σ实验价值-最小割 后面找实验与器材感性理解一下,如果一个实验被选,那么它没有被割,也就是还有路可以增广,从而从S进行bfs可以被搜到;同理器材(之后再写) 阅读全文
posted @ 2019-01-27 11:22 WiFiMonster 阅读(119) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1269 求交点见zhhx课件 阅读全文
posted @ 2019-01-26 16:30 WiFiMonster 阅读(137) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3304 等价于是否存在一条直线穿过所有线段 判断直线与线段是否相交: 首先用两点p1,p2确定了一条直线 在用p1,p2分别与计算线段两个端点计算叉乘即可 ,叉乘之积>0就说明线段两端点在直线的同侧,也就是直线不经过此线段 注意顺序不要搞反了 阅读全文
posted @ 2019-01-26 16:27 WiFiMonster 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 二分+叉积 http://poj.org/problem?id=2318 http://poj.org/problem?id=2398 阅读全文
posted @ 2019-01-26 14:44 WiFiMonster 阅读(150) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/zwfymqz/p/9264513.html#_label3_4 阅读全文
posted @ 2019-01-26 09:52 WiFiMonster 阅读(116) 评论(0) 推荐(0) 编辑
摘要: kruskal重构树 https://www.cnblogs.com/zwfymqz/p/9683523.html 阅读全文
posted @ 2019-01-25 20:40 WiFiMonster 阅读(112) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/cjyyb/p/8664527.html 阅读全文
posted @ 2019-01-25 15:31 WiFiMonster 阅读(243) 评论(1) 推荐(0) 编辑
摘要: #include using namespace std; const int maxn=1e6+4; int n,m,head[maxns; inline void tarjan(int u){ dfn[u]=low[u]=++tim; vis[u]=1; s.push(u); for(int i=head[u];i!=-1;i=e[i].next){ ... 阅读全文
posted @ 2019-01-25 15:30 WiFiMonster 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 三维偏序 阅读全文
posted @ 2019-01-15 11:32 WiFiMonster 阅读(148) 评论(0) 推荐(0) 编辑