摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2254题意:有向图中求A点到B点路径长度为t1~t2的路径总数离散数学中,有向图的邻接矩阵A表示所有点之间路径长度为1的路径数量,A^n则表示路径长度为n的路径数量,故需要求某两点在(A^t1)~(A^t2)的路径数量之和View Code 1 #include 2 #include 3 #include 4 const int N=31; 5 const int m=2008; 6 using namespace std; 7 int n,len; 8 struct Matrix{ 9 ... 阅读全文
posted @ 2013-03-02 13:19 ihge2k 阅读(300) 评论(0) 推荐(0) 编辑