上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<vector> 5 #include<set> 6 #include<map> 7 #include<queue> 8 using namespace 阅读全文
posted @ 2017-04-23 10:51 Robin! 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Problem You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an interna 阅读全文
posted @ 2017-04-20 21:55 Robin! 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Description Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by wa 阅读全文
posted @ 2017-04-20 19:59 Robin! 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Description A number of schools are connected to a computer network. Agreements have been developed among those schools: each school maintains a list 阅读全文
posted @ 2017-04-18 22:32 Robin! 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Description 每当西瓜的朋友来西瓜家看他,西瓜总是喜欢带他们逛自己的豪宅。西瓜的豪宅有N幢楼(1<=N<=1000),用1到N的整数编号。1号楼是西瓜豪宅的大门,N号楼是西瓜的储藏室。西瓜的豪宅里总共有M条道路(1<=M<=10000)。每条道路连接两栋不同的楼房,道路的长度不超过3500 阅读全文
posted @ 2017-04-17 21:38 Robin! 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1e3 + 5; 6 struct Edge { 7 int from, to, cap, flow, cost; 8 }; 9 10 ... 阅读全文
posted @ 2017-04-17 21:32 Robin! 阅读(1108) 评论(0) 推荐(0) 编辑
摘要: Dinic算法 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1e3 + 5; 6 阅读全文
posted @ 2017-04-17 20:34 Robin! 阅读(630) 评论(0) 推荐(0) 编辑
摘要: Description ​ZJ和ZCX在一起很久了,两个人都互生爱意,最终决定喜结良缘,从此踏入浪漫的婚姻殿堂。 但是,ZJ的好基友们想到以后ZJ就不能经常跟他们一起愉快的玩耍了,都觉得非常伤心难过,于是他们决定在最后一晚为ZJ开一场单身晚会,玩整晚紧张刺激的飞行棋。 ZJ的好基友居住在城市的各个地 阅读全文
posted @ 2017-04-16 12:51 Robin! 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://vjudge.net/problem/UVA-11324 题目大意:给定一张有向图G,求一个结点数最大的结点集,集合中每两个点都至少有一条路径相连(方向任意)。 题解: 易知如果一个点被选择,则它所在强连通分量中的其他点也一定要选,如果不选,则其他点也不可选,因此先求出强连 阅读全文
posted @ 2017-04-15 22:17 Robin! 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 两次dfs模板: 1 #include<bits/stdc++.h> 2 using namespace std; 3 #define INF 0x3f3f3f3f 4 #define M(a, b) memset(a, b, sizeof(a)) 5 const int N = 1000 + 5; 阅读全文
posted @ 2017-04-15 21:39 Robin! 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页