随笔分类 - 2-sat
摘要:原题链接 题解:注意建立边 代码: #include <iostream> #include <algorithm> #include <cstring> #include <cmath> using namespace std; const int N = 5e3 + 9; const int M
阅读全文
摘要:原题链接 题解:不要看到多重关系就慌张,其实本质上还是一对一对的关系,所以要提取出来,关键不得不做的信息,然后建图。 代码: #include <iostream> #include <algorithm> #include <cstring> using namespace std; const
阅读全文
摘要:P4782 【模板】2-SAT 问题 #include <iostream> #include <algorithm> #include <cstring> using namespace std; const int N = 2e6 + 9; const int M = 2e6 + 9; int
阅读全文