随笔分类 -  图论(集合)

二分,网络流,费用流,连通图,拓扑等等
摘要:#include #include #include #include #define N 10010 using namespace std; vector head[N]; stack way; long int n; bool visited[N][N]; bool vis[N]; long long int d[N]; void addEdge(long int x,long int... 阅读全文
posted @ 2016-04-01 21:29 柳下_MBX 阅读(330) 评论(0) 推荐(0)
摘要:B - Dining Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3281 B - Dining Submit Status Practice POJ 阅读全文
posted @ 2016-03-31 11:24 柳下_MBX 阅读(181) 评论(0) 推荐(0)
摘要:D - Going Home Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2195 D - Going Home Submit Status Pract 阅读全文
posted @ 2016-03-12 11:30 柳下_MBX 阅读(189) 评论(0) 推荐(0)
摘要:Current Time: 2016-03-11 17:45:36 Contest Type: Public Start Time: 2016-03-04 13:00:00 Contest Status: Running End Time: 2016-05-03 13:00:00 Manager: 阅读全文
posted @ 2016-03-11 17:47 柳下_MBX 阅读(136) 评论(0) 推荐(0)
摘要:R - Work Scheduling Time Limit:500MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice URAL 1099 Appoint description: Descript 阅读全文
posted @ 2016-03-11 17:46 柳下_MBX 阅读(284) 评论(0) 推荐(0)
摘要:Hopcroft-Karp算法 该算法由John.E.Hopcroft和Richard M.Karp于1973提出,故称Hopcroft-Karp算法。 原理 为了降低时间复杂度,可以在增广匹配集合M时,每次寻找多条增广路径。这样就可以进一步降低时间复杂度,可以证明,算法的时间复杂度可以到达O(n^ 阅读全文
posted @ 2016-03-07 23:11 柳下_MBX 阅读(867) 评论(0) 推荐(0)
摘要:F - Heavy Transportation Time Limit:3000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1797 F - Heavy Transportation 阅读全文
posted @ 2015-11-22 21:52 柳下_MBX 阅读(355) 评论(0) 推荐(0)
摘要:C - 昂贵的聘礼 Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1062 C - 昂贵的聘礼 Submit Status Practice POJ 10 阅读全文
posted @ 2015-11-22 17:39 柳下_MBX 阅读(431) 评论(0) 推荐(0)
摘要:E - charge-station Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4435 E - charge-station Submit Stat 阅读全文
posted @ 2015-11-20 21:04 柳下_MBX 阅读(183) 评论(0) 推荐(0)
摘要:现在给出N个字母,(前N个大写字母),然后给出M个关系,每个关系只有大于和小于两种。 最后判断那些是可以确定他应有的大小位置的。 (没有给出的关系,均属于不可确定) 本题要求输出可以确定的人的排名2,首先需要建两个图,正向建一个反向建一个。 由于是有向图,对两个图中的每一个点进行bfs,记录以他为起 阅读全文
posted @ 2015-10-10 17:04 柳下_MBX 阅读(369) 评论(0) 推荐(0)
摘要:第k*短路模板(单项边) #include #include #include #include #include #define Max 100005 #define inf 1a.len+dis[a.v]; } }; void insert(int u,int v,int len){//正图和逆图 edge[num].v=v; edge[num].len=l... 阅读全文
posted @ 2015-10-06 19:30 柳下_MBX 阅读(446) 评论(0) 推荐(0)
摘要:Roadblocks Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10098 Accepted: 3620 Description Bessie has moved to a small farm and sometimes 阅读全文
posted @ 2015-10-06 19:29 柳下_MBX 阅读(199) 评论(0) 推荐(0)
摘要:find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3456 Accepted Submission(s 阅读全文
posted @ 2015-09-30 19:50 柳下_MBX 阅读(394) 评论(0) 推荐(0)
摘要:R - Work scheduling Time Limit:500MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice URAL 1099DescriptionThere is certain amo... 阅读全文
posted @ 2015-09-28 20:38 柳下_MBX 阅读(245) 评论(0) 推荐(0)
摘要:Sightseeing trip Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5590 Accepted: 2151 Special Judge Description There is a travel agency in 阅读全文
posted @ 2015-09-25 20:50 柳下_MBX 阅读(205) 评论(0) 推荐(0)
摘要:S - Two Teams Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice URAL 1106 S - Two Teams Submit Status Practi 阅读全文
posted @ 2015-09-22 20:59 柳下_MBX 阅读(284) 评论(0) 推荐(0)
摘要:以下是最小生成树+并查集 【HDU】 1213 How Many Tables 基础并查集★ 1272 小希的迷宫 基础并查集★ 1325&&poj1308 Is It A Tree? 基础并查集★ 1856 More is better 基础并查集★ 1102 Constructing Roads 阅读全文
posted @ 2015-09-20 09:01 柳下_MBX 阅读(833) 评论(0) 推荐(0)
摘要:find the longest of the shortest Time Limit: 1000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2424 Accepted Su 阅读全文
posted @ 2015-09-18 18:36 柳下_MBX 阅读(256) 评论(0) 推荐(0)
摘要:Travel Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1225 Accepted Submission(s): 443 Problem 阅读全文
posted @ 2015-09-15 21:28 柳下_MBX 阅读(146) 评论(0) 推荐(0)
摘要:Ponds Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1288 Accepted Submission(s): 429 Problem 阅读全文
posted @ 2015-09-15 11:57 柳下_MBX 阅读(162) 评论(0) 推荐(0)