摘要: Tr ATime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1994 Accepted Submission(s): 1472 Problem DescriptionA为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 2 #include 3 #include 4 #include 5 using namespace std;. 阅读全文
posted @ 2013-08-18 22:54 芷水 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 矩阵是一个很好的工具,参考别人到博客:http://mindlee.net/2011/11/21/matrix-multiply/经典矩阵相乘10题,大牛博客 http://www.matrix67.com/blog/archives/276/ 1 /* 2 矩阵的运用很宽泛 3 */ 4 #include 5 #include 6 #include 7 #include 8 #define N 100 9 #define mod 10000007 10 using namespace std; 11 12 struct Matrix 13 { 14 int mat... 阅读全文
posted @ 2013-08-18 12:25 芷水 阅读(263) 评论(0) 推荐(0) 编辑
摘要: A Simple Math ProblemTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1838Accepted Submission(s): 1053Problem DescriptionLele now is thinking about a simple function f(x).If x = 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10);A 阅读全文
posted @ 2013-08-18 12:06 芷水 阅读(197) 评论(0) 推荐(0) 编辑