2023年2月19日
摘要: 给n*n的方格图铺满1*2 的长条,且某些位置不能铺,问最多能放多少个长条 #include <iostream> #include<queue> #include <vector> #include <cstring> using namespace std; const int N =110 , 阅读全文
posted @ 2023-02-19 19:43 towboat 阅读(22) 评论(0) 推荐(0)
摘要: 二分图最大匹配 1.匈牙利算法: 做法是 u 尽量 匹配 v , 如果v已有配对 y,就重新配对 y https://www.luogu.com.cn/record/128670058 2. 网络流解决 性质: 最大独立集= 点数-最大匹配 最小顶点集覆盖数= 最大匹配 阅读全文
posted @ 2023-02-19 15:30 towboat 阅读(17) 评论(0) 推荐(0)
摘要: 无向图一笔画需要多少次(欧拉路径的条数) 答案:奇数点的个数 / 2 这题需要维护联通块,用并查集即可 #include <iostream> #include <algorithm> #include <cstring> #include <stack> using namespace std ; 阅读全文
posted @ 2023-02-19 15:02 towboat 阅读(23) 评论(0) 推荐(0)
摘要: 求一个无向图的欧拉回路,但要求每条边正反过一次 当作有向图,打标记只打一条边 #include <iostream> #include <algorithm> #include <cstring> #include <stack> using namespace std ; const int N= 阅读全文
posted @ 2023-02-19 14:01 towboat 阅读(13) 评论(0) 推荐(0)