摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1063#include#include#include#include#include#include#includeusing namespace std;const int maxn = 10050;const int INF = 0x3f3f3f;vector G[maxn];int pre[maxn],low[maxn],dfs_clock;bool iscut[maxn];int ans;int n,m;void tarjan(int u,int fa){ pre[u... 阅读全文
posted @ 2013-08-17 22:59 等待最好的两个人 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1026#include#include#include#include#include#include#includeusing namespace std;const int maxn = 10050;const int INF = 0x3f3f3f;vector G[maxn];int pre[maxn],dfs_clock,low[maxn];struct ANS{ int l,r; bool operator pre[u]){ ans... 阅读全文
posted @ 2013-08-17 22:14 等待最好的两个人 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 这题的英语either...or....很蛋疼;m中,1:x与y至少一个出席;2:x出席,y随便,x不出席,y也不出席----这有个坑,可以推出y出席x也一定出席(这个关系必须要连上);3x与y至少一个不出席 4,x与y有且只有一个出席。对于k中的数据:我琢磨很久,关系在图上是建不了的,type为1时三个人至少有一个人要出席,则三个都不出席的情况是不允许的,dfs的时候判断一下就是了,同理type为2的情况。#include#include#include#include#include#include#includeusing namespace std;const int maxn = 1 阅读全文
posted @ 2013-08-17 17:04 等待最好的两个人 阅读(216) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#includeusing namespace std;const int maxn = 20050;const int INF = 0x3f3f3f;int n,m;char a[maxn][2];int b[maxn][2];struct TwoSat{ int n; vector G[maxn*2]; bool mark[2*maxn]; int s[2*maxn],cnt; void init(int n){ this->n = n; ... 阅读全文
posted @ 2013-08-17 13:37 等待最好的两个人 阅读(286) 评论(0) 推荐(0) 编辑