2013年6月17日

hdoj 2157 How many ways??

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2157解题思路:矩阵快速幂 1 #include 2 using namespace std; 3 4 int n; //n个点,对应nxn矩阵 5 6 struct Matrix{ 7 int a[20][20]; 8 }res; 9 10 Matrix multiply(Matrix x,Matrix y){11 Matrix temp;12 for(int i=0;i>=1;26 origin=multiply(origin,origin);27 ... 阅读全文

posted @ 2013-06-17 23:23 SCNU20102200088 阅读(242) 评论(0) 推荐(0) 编辑

导航