上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 18 下一页
摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1760#include #include #include #include #include #include #include #define maxn 105#define maxe 100000using namespace std;const int INF = 0x3f3f3f;struct Edge{ int u,v,flow,cap; int next; Edge(int u=0,int v=0,int flow=0,int cap... 阅读全文
posted @ 2013-08-19 16:38 等待最好的两个人 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1149#include #include #include #include #include #include #include #define maxn 1050#define maxe 200000using namespace std;const int INF = 0x3f3f3f;struct Edge{ int u,v,flow,cap; int next; Edge(int u=0,int v=0,int flow=0,int cap=0,int next=0): u(u),v(v... 阅读全文
posted @ 2013-08-19 11:34 等待最好的两个人 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3281#include #include #include #include #include #include #include #define maxn 105#define maxe 20000using namespace std;const int INF = 0x3f3f3f;struct Edge{ int u,v,flow,cap; int next; Edge(int u=0,int v=0,int flow=0,int cap=0,int next=0): u(u),v(v),... 阅读全文
posted @ 2013-08-19 10:40 等待最好的两个人 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1300边双连通分量首先dfs找出桥并标记,然后dfs交叉着色找奇圈上的点。这题只要求在奇圈上的点个数。容易得到,一个边双联通分量如果存在奇圈,那么整个分量上的点都属于某个奇圈。#include#include#include#include#include#include#includeusing namespace std;const int maxn = 11150;const int maxe = 30100;const int INF = 0x3f3f3f;int pre[m 阅读全文
posted @ 2013-08-18 19:37 等待最好的两个人 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1291#include#include#include#include#include#include#includeusing namespace std;const int maxn = 11150;const int INF = 0x3f3f3f;int pre[maxn],low[maxn],dfs_clock;int bccnum[maxn],bcc_cnt; //记录每个点属于哪个边联通分量;bool isbridge[maxn*5]; //isbridge[i... 阅读全文
posted @ 2013-08-18 11:23 等待最好的两个人 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 题目链接: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) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4681#include#include#include#include#include#include#includeusing namespace std;const int maxn = 1010;const int INF = 0x3f3f3f;char a[maxn],b[maxn],c[maxn];int dp1[maxn][maxn];int dp2[maxn][maxn];void Lcs1(char* s1,char* s2,int m,int n){ for(int i=1;... 阅读全文
posted @ 2013-08-16 09:30 等待最好的两个人 阅读(166) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 18 下一页