摘要: P3355 骑士共存问题 题意: 也是一个棋盘,规则是“马”不能相互打到。 思路: 奇偶点分开,二分图建图,这道题要注意每个点可以跑八个方向,两边都可以跑,所以边 = 20 * n * n。 然后dinic 要用当前弧优化。 #include <algorithm> #include <iterat 阅读全文
posted @ 2019-02-04 16:00 ckxkexing 阅读(261) 评论(0) 推荐(0) 编辑
摘要: P1726 上白泽慧音 这是一道用tarjan做的模板,要求找到有向图中最大的联通块。 #include <algorithm> #include <iterator> #include <iostream> #include <cstring> #include <cstdlib> #includ 阅读全文
posted @ 2019-02-04 13:06 ckxkexing 阅读(150) 评论(0) 推荐(0) 编辑