随笔分类 - 图论(集合)
二分,网络流,费用流,连通图,拓扑等等
摘要:#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...
阅读全文
摘要:B - Dining Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3281 B - Dining Submit Status Practice POJ
阅读全文
摘要: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
阅读全文
摘要: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:
阅读全文
摘要:R - Work Scheduling Time Limit:500MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice URAL 1099 Appoint description: Descript
阅读全文
摘要:Hopcroft-Karp算法 该算法由John.E.Hopcroft和Richard M.Karp于1973提出,故称Hopcroft-Karp算法。 原理 为了降低时间复杂度,可以在增广匹配集合M时,每次寻找多条增广路径。这样就可以进一步降低时间复杂度,可以证明,算法的时间复杂度可以到达O(n^
阅读全文
摘要:F - Heavy Transportation Time Limit:3000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1797 F - Heavy Transportation
阅读全文
摘要:C - 昂贵的聘礼 Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1062 C - 昂贵的聘礼 Submit Status Practice POJ 10
阅读全文
摘要:E - charge-station Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 4435 E - charge-station Submit Stat
阅读全文
摘要:现在给出N个字母,(前N个大写字母),然后给出M个关系,每个关系只有大于和小于两种。 最后判断那些是可以确定他应有的大小位置的。 (没有给出的关系,均属于不可确定) 本题要求输出可以确定的人的排名2,首先需要建两个图,正向建一个反向建一个。 由于是有向图,对两个图中的每一个点进行bfs,记录以他为起
阅读全文
摘要:第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...
阅读全文
摘要:Roadblocks Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10098 Accepted: 3620 Description Bessie has moved to a small farm and sometimes
阅读全文
摘要: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
阅读全文
摘要:R - Work scheduling Time Limit:500MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit Status Practice URAL 1099DescriptionThere is certain amo...
阅读全文
摘要:Sightseeing trip Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5590 Accepted: 2151 Special Judge Description There is a travel agency in
阅读全文
摘要: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
阅读全文
摘要:以下是最小生成树+并查集 【HDU】 1213 How Many Tables 基础并查集★ 1272 小希的迷宫 基础并查集★ 1325&&poj1308 Is It A Tree? 基础并查集★ 1856 More is better 基础并查集★ 1102 Constructing Roads
阅读全文
摘要: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
阅读全文
摘要:Travel Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1225 Accepted Submission(s): 443 Problem
阅读全文
摘要:Ponds Time Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1288 Accepted Submission(s): 429 Problem
阅读全文