随笔分类 -  图论 拓扑排序

摘要:Matching In Multiplication Problem DescriptionIn the mathematical discipline of graph theory, a bipartite graph is a graph whose vertices can be divid 阅读全文
posted @ 2017-08-06 21:04 meekyan 阅读(315) 评论(0) 推荐(1)
摘要:题目链接: http://bestcoder.hdu.edu.cn/contests/contest_show.php?cid=701 1001 : 矩阵快速幂 #include <iostream> #include <algorithm> #include <cstdio> #include < 阅读全文
posted @ 2016-05-21 17:51 meekyan 阅读(793) 评论(2) 推荐(3)
摘要:C. Mail Stamps One day Bob got a letter in an envelope. Bob knows that when Berland's post officers send a letter directly from city «A» to city «B», 阅读全文
posted @ 2016-04-20 20:11 meekyan 阅读(246) 评论(0) 推荐(0)
摘要:Toposort 问题描述 给出nn个点mm条边的有向无环图. 要求删掉恰好kk条边使得字典序最小的拓扑序列尽可能小. 输入描述 输入包含多组数据. 第一行有一个整数TT, 表示测试数据组数. 对于每组数据: 第一行包含3个整数nn, mm和kk (1 \le n \le 100000, 0 \le 阅读全文
posted @ 2016-03-05 21:34 meekyan 阅读(584) 评论(2) 推荐(0)
摘要:DZY Loves Topological SortingProblem DescriptionA topological sort or topological ordering of a directed graph is a linear ordering of its vertices su... 阅读全文
posted @ 2015-11-10 20:39 meekyan 阅读(185) 评论(0) 推荐(0)