摘要: 2-SAT,根据题意建好图,求一下强联通分量,判断一下就可以了#include#include#include#include#include#includeusing namespace std;const int maxn=6005;int T,M;vectorG[maxn];vectorFG[... 阅读全文
posted @ 2015-10-23 14:35 Fighting_Heart 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 2-SAT入门题,强联通分量缩点之后,如果夫妻位于同一强联通分量,则无解。#include#include#include#include#include#includeusing namespace std;const int maxn=2005;int N,M;int A1,A2,C1,C2;v... 阅读全文
posted @ 2015-10-23 11:57 Fighting_Heart 阅读(148) 评论(0) 推荐(0) 编辑